Coder Social home page Coder Social logo

git-server-docker's People

Contributors

jkarlosb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-server-docker's Issues

Feature Request: Support for cookie-based auth

##As an alternative to typical SSH auth, we'd have use for authentication via a cookie file.

This engages the http.cookiefile option of git config.

More specifically, we'd like to do so in the context of the git-sync package, which sets the http.cookiefile via the command: (see line 679)

git config --global http.cookiefile [PATH/TO/COOKIEFILE] 

Is there current support for this?

Thank you!

error: insufficient permission for adding an object to repository database ./objects

when attempting to push changes to upstream I am faced with the following:
git commit -m "init" [master (root-commit) ec6447c] init 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test $ git push Counting objects: 3, done. Writing objects: 100% (3/3), 212 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) remote: error: insufficient permission for adding an object to repository database ./objects remote: fatal: failed to write object error: unpack failed: unpack-objects abnormal exit To git@gitserver:/git-server/repos/runscripts ! [remote rejected] master -> master (unpacker error) error: failed to push some refs to 'git@gitserver:/git-server/repos/runscripts'
I have changed the ownership of the mounted /git-server to the UID of the git user in the container.
Any way to solve this?

Public keys must have EOF char

If two public keys will uploaded and first key has no newline char at the end of file, then two keys are written in one line in authorized_keys file. Authorization using second key is impossible.

Root cause:
cat /git-server/keys/*.pub > .ssh/authorized_keys

What is the user@host?

This might be a stupid question but

Copy them to keys folder: 
- From host: $ cp ~/.ssh/id_rsa.pub ~/git-server/keys
- From remote: $ scp ~/.ssh/id_rsa.pub user@host:~/git-server/keys
You need restart the container when keys are updated:
$ docker restart <container-id>

What is the user@host here? I'm guessing it relates to the localhost? and the hostname?

Thanks,

Abandoned Project?

Sadly, this project has seen no updates since 2017. I've decided to have a go a packaging a very close solution, which hopefully solves some of the open issues from this project and adds some other useful utilities:

  • A single authorized_keys file is used, instead of copying keys onto it from a directory (Avoids #17 and #26)
  • ARM builds provided (Fixes #16 and #28)
  • Allow custom SSH host keys (Fixes #13 and #15)
  • Coded from scratch and therefore with a new (GPL-3.0) license (Fixes #8)
  • Admin commands added to allow the git user to create/remove repositories instead of forcing making it from the host (in an attempt to simplify the novice user experience).
  • Allow setting the UID/GID of the git user (to slightly mitigate the permissions issues when modifying files from both the host and the container)
  • A variant of the image is provided which includes Docker CLI (to allow the git server to start other containers, e.g. to run CI/CD actions)

https://github.com/rockstorm101/git-server-docker

Any comments or suggestions, please let me know. Hope you find this useful.

Add bash and curl

Bash and curl would be useful to implement server-side hooks, e.g. to notify pushes to a webserver. The image overall size won't be affected too much.

Files on server?

I have a git server and everything is in test.git under git home directory. I can not get to the files that have been pushed to it and clone the repo does not get me to the files.

Where are the files located when git push origin master are?

Enhance Readme

Noobs question: Your Readme is great. Got everything working from there. Could you add a paragraph on how to add an additional git user?

I.e.
How to add an additional Git user:
Append the public key of the new git user to the ~/git-server/keys/id_rsa.pub and restart the git server

  • From host: $ cat new_user_id_rsa.pub >>~/git-server/keys

Such a great way to setup a git. Hope you can help.

Troubleshooting help pls for "repo does not exist"

I'm getting "my repo does not exist"... tearing my hair out, can you give any troubleshooting tips?
-I can ssh and get the msg "...but i do not provide interactive shell" (so key is good)
-I can "docker exec -it hash /bin/sh" and see /git-server and subs keys and repos, files inside etc
(so my volumes are good and are visible from inside container, and i see "myrepo")
-When i do a "git clone --mirror [email protected]:222/git-server/repos/myrepo ." from home, i get
..."does not exist"
(In below, i am using port 222 on purpose... 22 and 2222 already used...)
-When i do a "git clone ssh://[email protected]:222/git-server/repos/myrepo", i get...
"Cloning into 'myrepo'...
[email protected]: Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

-Is there ANY way to list from remotely? or a way to get it to go interactive to test?

I know i'm SO CLOSE, but not sure why it's not working...

-I did see the post "permission Error when trying to do: git push"
fix: (tried... didn't work for me)
/git-server/repos # sudo chmod -R ug+w .;

Thanks so much for any help...

Problems to connect with TortoiseGit Windows

I have problems connecting from my windows client to this docker git server container. I do -p 2222:22 just like in the readme and added my "ssh-rsa ..." public key to the keys folder.

But when i try to connect to port 2222 with git or tortoiseGit I get the following error
image

Is there some way to read any logs? I don't get anything back with 'docker-compose logs -t' or 'docker logs git-server' (where git-server is the containers name).

I don't know if my problem is server or client side, I just think I do it the same way on client side as I did it before when connecting to my previous gitlab (Putty Key as private key).

Any idea how to proceed?

Docker build fails on ARMv7.

I tried building an image on my ODROID-XU4(armv7).
Docker build failed with the message saying
"docker arm no matching manifest for unknown in the manifest list entries".

It seems that alpine:3.4 has no image for armv7.
Changing "FROM alpine:3.4" to "FROM alpine:latest" results in a successful build.

How about changing alpine tag to 3.7 or later version?

Thank you for your great work.

Closed repository

Hi, when I try to clone your repository, it asks for my credentials.

I think this is undesirable because I can't use your code in my CI server.

Could you please open it up?

Thanks

sshd_config unsupported options

I get the following log entries after launching the container via docker-compose up:

git-server_1  | /etc/ssh/sshd_config line 80: Unsupported option KerberosAuthentication
git-server_1  | /etc/ssh/sshd_config line 86: Unsupported option GSSAPIAuthentication

SCP dooesn't work

When I try to scp into the container I get the following error:

fatal: unrecognized command 'scp -f /myfolder'

I guess git-shell restricts which commands can be run.
How do the scp examples in the documentation work?
Do I need to enable anything to make it work?

How to access certain branch of a repo

It's not mentioned in the README, but is it possible to read the content of one of the repos (f.e. master branch) in the volume? F.e. to reuse the volume for another container that uses that content, like a Hugo or just nginx?

Key in authorized_keys

I'm trying to use this to push from my web container to the git-server container.

But I can only get it to work by moving the public key into /home/git/.ssh/authorized_keys in the git-server container.

I don't see how else it would work. How is the /git-server/keys used in the sshd_config? Is there something I'm missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.