... or how to setup Tor git access with darkfi repo.
We assume you have tor installed locally and access to Tor browser. You can check your tor daemon is running by running this command:
curl --socks5-hostname 127.0.0.1:9050 https://myip.wtf/text
Follow these steps:
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_tor -C foo@foo.ssh/id_tor.pub to your account on codeberg.echo -n 'XXX' | ssh-keygen -Y sign -n gitea -f ~/.ssh/id_tor
where XXX is the string given on codeberg.You will need BSD netcat installed. Optionally you could use GNU netcat, but
the flags are different; replace -x with --proxy ... --proxy-type=socks5.
Add a section in ~/.ssh/config like this:
Host codeberg-tor
# Use this for debugging errors
#LogLevel VERBOSE
User git
HostName codeberg.org
IdentitiesOnly yes
IdentityFile ~/.ssh/id_tor
ProxyCommand nc -x 127.0.0.1:9050 %h %p
Then test it is working with ssh -T git@codeberg-tor -vvv.
Be sure to verify the signatures match those on the codeberg website.
To see them, copy this link into Tor Browser:
https://docs.codeberg.org/security/ssh-fingerprint/
The last step is routine:
git remote add codeberg git@codeberg-tor:darkrenaissance/darkfi.git
# Optionally delete the github origin:
git remote rm origin
And then finally it should work. Make sure you use git push -u codeb master
to update your main source to codeberg over Tor. You don't want to accidentally
git push to github and dox yourself.
Lastly you can still be identified by your machine's Git config, if pushing to external repos on clearnet. However we can set per project settings, so inside the darkfi repo, run these commands:
git config user.name darkfi
git config user.email darkfi@darkfi
Verify it has been set with cat .git/config.