Skip to content

snippets-n-memes/tiny-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tiny-git

Docker image built from git-scm instructions

Docker

docker run -d -p 8888:22 tiny-git
  • After creation you must copy your ssh public key to the authorized_keys file in /home/git/.ssh/authorized_keys
  • .ssh directory and contained folders need to be owned by git user and have proper permissions
  • /etc/ssh/sshd_config needs the correct path to the authorized keys file
  • git user shell should be the git-shell

UPDATE:

  • >=20231111.9
    • sshd_config is setup correctly for ssh in the image
  • >=[arm64,amd64]-20231111.21
    • arm64 and amd64 builds are both available
    • make docker-run will run an image for you and mount a file named id_rsa.pub in your local dir to authorize keys for you

once the image has started you can clone the example project repo to verify ssh is working correctly

git clone ssh://[email protected]:8080/srv/git/project.git

Kubernetes

Enable ssh tcp port for ingress-nginx

  1. apply configmap
  2. point to configmap in ingress-nginx-controller deployment
    spec:
      containers:
      - args:
        - /nginx-ingress-controller
        - --tcp-services-configmap=$(POD_NAMESPACE)/ingress-nginx-tcp
  3. expose ssh port on ingress-nginx service
    spec:
        ports:
        - name: 8080-tcp
            nodePort: 30957
            port: 8080
            protocol: TCP
            targetPort: 8080
  4. clone repo to test
    git clone ssh://[email protected]:30957/srv/git/project.git

About

minimalist git server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages