Skip to content

mhowlett/dockgit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dockgit

A remote git server docker image.

Instructions:

  1. Clone this git repo on the computer you would like to set up as a remote git server:
 git clone https://github.com/mhowlett/dockgit.git
  1. Create an authorized_keys file by concatenating any number of public keys together:
 cd dockgit
 cat ~/.ssh/id_rsa.pub >> authorized_keys
 cat [some other public key] >> authorized_keys
 ...
  1. Build the docker image with:
 docker build -t dockgit .
  1. Create a data directory
 mkdir /data

note that the folder /data/dockgit/repos will be created when you bring the container up.

  1. bring up the container:
 ./docker-up.sh
  1. to make new repo:

log in as git:

  ssh -p 2332 git@localhost
  cd /repos
  mkdir example.git
  cd example.git
  git --bare init
  1. to push to the new repo:

on your local machine:

  mkdir example
  cd example
  git init
  touch README
  git add README
  git commit -m 'first commit'
  git remote add origin ssh://git@<server>:2332/repos/example.git
  git push origin master

to clone an existing repo:

  git clone ssh://git@globalonset.com:2332/repos/example.git

About

A docker image that makes it easy set up a personal git server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages