Support to use git-remote-gcrypt (OD-973)
Closed
Germán Salazar opened 2 years ago

Hi, first timer, here. I did not find a place to ask for help. Noticed issues target onedev/server; so, adding to it, too.

I am looking for a way to self-host an instance of some Git remote and be able to encrypt a repository. Exploring the internet several self-hosted apps came up: Gitlab, Gitea, OneDev; and git-remote-gcrypt for encryption...I would like to give OneDev a try.

Here is what I have done and what I am witnessing while trying to push an encrypted repo.

#Installed OneDev 
#Created a repo: firstone
#Cloned it: 
git clone ssh://my.instance.of.onedev.net:6611/firstone
git remote -v 
origin	ssh://my.instance.of.onedev.net:6611/firstone (fetch)
origin	ssh://my.instance.of.onedev.net:6611/firstone (push)
# attempt to add encrypted remote, but I don't know for sure what this line is supposed to look like!
git remote add cryptremote gcrypt::rsync://my.instance.of.onedev.net:6611/firstone
# config
git config remote.cryptremote.gcrypt-participants "MYKEY"
git config remote.cryptremote.gcrypt-publish-participants true
# push
git push  cryptremote  alpha
gcrypt: WARNING: 'MYKEY' matches multiple fingerprints, using one
gcrypt: Repository not found: rsync://my.instance.of.onedev.net:6611/firstone
gcrypt: Setting up new repository
rsync: change_dir#3 "/home/<userid>//6611" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(694) [Receiver=3.1.2]

Is OneDev able to welcome an encrypted repo? What is the format of the gcrypt:: remote?
I see various suggestions online that include either 'git' or '', but I can't seem to get it right.

Robin Shen commented 2 years ago

Never tried with gcrypt. Will explore it and get OneDev supporting it. Converting this as an improvement request.

Robin Shen changed fields 2 years ago
Name Previous Value Current Value
Type
Support Request
Improvement
Robin Shen changed title 2 years ago
Previous Value Current Value
Help using git-remote-gcrypt
Support to use git-remote-gcrypt
Germán Salazar commented 2 years ago

Oh, damn; great. Thanks.

Robin Shen changed state to 'Closed' 1 year ago
Previous Value Current Value
Open
Closed
Robin Shen commented 1 year ago

OneDev uses a customized ssh server and do not support to run arbitrary command at server side (rsync in this example). A workaround is to run gcrypt over http protocol:

gcrypt::http://my.instance.of.onedev.net:6610/firstone

However this approach has the drawback of sending all repository history even for a minor commit.

issue 1 of 1
Type
Improvement
Priority
Normal
Assignee
Issue Votes (0)
Watchers (3)
Reference
OD-973
Please wait...
Page is in error, reload to recover