You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jan Christian Grünhage cf6cde36a2
Another README.md change
3 years ago
.gitignore Initial commit 3 years ago
LICENSE Initial commit 3 years ago
README.md Another README.md change 3 years ago
example.json Added source code 3 years ago
main.go Added source code 3 years ago

README.md

Generate an authorized_keys file:

When working with borg serve in an automated environment, you should use an authorized_keys file that restricts the ssh sessions to use only borg, and only in the directory where the repo they should use lies in. This binary takes in a json file specifying the needed info and prints out the wanted authorized_keys file.

To generate that file, do this (assuming you have set up everything needed for go get, and $GOPATH/bin is in your $PATH):

go get git.jcg.re/jcgruenhage/borg-gen-auth-keys.git
borg-gen-auth-keys.git yourjsonfile.json > ~/.ssh/authorized_keys  

PS: If anyone could tell me how to get rid of this .git in the end, that would be nice. If someone could tell me, how to make it so that I can put this in a subfolder of another repository, that would be even better (a script collection). At the moment, doing any of those two breaks go get.. Maybe this is something that needs to be fixed in gitea ^^