Skip to content

qishibo/git-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Git Server For Multi-User

Running in docker, just like a simple gitlab. The user created is a real linux user but cannot login. Different users' repository cannot be accessed to each other.

Install

docker run -itd  -p2022:22 --name git-server qii404/git-server:latest

RUN

# create a user
docker exec git-server create_user username password

# create a  repository for a user
docker exec git-server create_project username repository

# clone
git clone ssh://username@127.0.0.1:2022/git_codes/username/repository.git
# enter password

# push
git push origin master

You can also run commands inside docker, such as:

# in docker
docker exec -it git-server sh

# create a user
create_user username password

# create a repository for a user
create_project username repository

Tips

If you want to exec ssh username@127.0.0.1 -p2022 to login git server, you will get this error:

> You Wanna Login ?? No Way!!
> fatal: Interactive git shell is not enabled.
> hint: ~/git-shell-commands should exist and have read and execute access.
> Connection to 127.0.0.1 closed.

Contact me in Weibo, or qii404.me

About

Git Server For Multi-User, Running In Docker, Just Like A Simple Gitlab ~

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published