https://github.com/qishibo/git-server
Git Server For Multi-User, Running In Docker, Just Like A Simple Gitlab ~
https://github.com/qishibo/git-server
docker git-server multi-user
Last synced: 9 months ago
JSON representation
Git Server For Multi-User, Running In Docker, Just Like A Simple Gitlab ~
- Host: GitHub
- URL: https://github.com/qishibo/git-server
- Owner: qishibo
- Created: 2018-04-05T02:18:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-26T09:32:23.000Z (over 6 years ago)
- Last Synced: 2025-03-24T22:51:15.447Z (9 months ago)
- Topics: docker, git-server, multi-user
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```bash
docker run -itd -p2022:22 --name git-server qii404/git-server:latest
```
## RUN
```bash
# 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:
```bash
# 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:
```bash
> 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](https://weibo.com/shiboooo), or [qii404.me](https://qii404.me)