Skip to content
/ git-nfs Public

Make git repo as a nfs server storage backend

Notifications You must be signed in to change notification settings

iineva/git-nfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-nfs

Make git repo as a nfs server storage backend

Features

  • NFS v3
  • In memory filesystem to cache files
  • Sync files to git repository every 5s (option to set)

Getting Started

  • build and run
git clone github.com/iineva/git-nfs
cd git-nfs/cmd/gitnfs/
# change port number whatever you want
go run gitnfs.go -d -a ":1234" https://github.com/iineva/git-nfs
  • nfs client mount option
mkdir /tmp/test_gitnfs
mount -o "port=1234,mountport=1234,intr,noresvport,nolock,noacl" -t nfs localhost:/ /tmp/test_gitnfs
ls /tmp/test_gitnfs
# umount /tmp/test_gitnfs

Usage

Usage: gitnfs [options] <YOUR_GIT_REPO_URL>

Options:
  -K string
        private key password
  -a string
        nfs listen addr (default ":0")
  -d    enable debug logs
  -e string
        git commit email (default "[email protected]")
  -f string
        private key file
  -h    this help
  -k string
        private key string
  -m string
        git commit name (default "gitnfs")
  -o    make nfs server readonly
  -p string
        basic auth password or GitHub personal access token
  -r string
        git reference name (default "refs/heads/main")
  -s duration
        interval when sync nfs files to git repo (default 5s)
  -u string
        basic auth user name

Dependent

TODO

  • feature: git repo auth: username, ssh
  • feature: cache files to local dir
  • feature: ability to set number of commit history
  • feature: nfs readonly mode
  • feature: docker and kubernetes depoly
  • optimize: file diff before push

About

Make git repo as a nfs server storage backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages