Skip to content

chrisha86/git-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 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 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://[email protected]: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 [email protected] -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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published