mirror of
https://git.sdf.org/deCloudflare/deCloudflare/
synced 2024-11-16 12:32:39 +00:00
2.6 KiB
2.6 KiB
How to setup git
This procedure will give you a cloudflare-tor fork with a privacy-respecting configuration to do pushes with SSH over Tor using the onion host for codeberg.org ("CDB"). This procedure is designed for linux. The first step covers Windows too, but these instructions probably need more adaptations for Windows and other platforms.
- Linux:
aptitude install git tor ssh
- Windows: Download
https://github.com/git-for-windows/git/releases/PortableGit-2.21.0-64-bit.7z
& rungit-bash.exe
[1]
host notabug-*
hostname qs3zumwfci4tntnd.onion
ForwardX11 no
ProxyCommand connect -4 -S 127.0.01:9050 %h %p
host notabug-snowden
IdentityFile /home/user/.ssh/id_rsa_nab-snowden
[2]
[user]
email = BM-yadayadayada6fgnLfybVnCcWf25AGZcgg@bitmessage.ch
name = snowden
[remote "origin"]
url = git@notabug-snowden:snowden/cloudflare-tor.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
- install Git, SSH(Not Windows), and Tor (if you haven't already)
- create a `notabug.org` account (username "snowden" will be used for this example)
- create an SSH key pair `$ ssh-keygen -t rsa -N '' -C 'snowden at notabug' -f "$HOME"/.ssh/id_rsa_nab-snowden`
- edit `$HOME/.ssh/config`[1]
- copy `"$HOME"/.ssh/id_rsa_nab-snowden.pub` to clipboard
- notabug.org > settings > SSH Keys > add key (paste from clipboard)
- $ `firefox https://codeberg.org/crimeflare/cloudflare-tor`
- fork it (top right corner)
- go to the directory you want the project to be rooted in (hereafter we'll call it `$project_root`).
- anonymously download your fork: $ `torsocks git clone https://notabug.org/snowden/cloudflare-tor`
- edit `$project_root/cloudflare-tor/.git/config` to include the account name and email address that will be on every commit, as well as the URL[2]
- make your first change
- (from `$project_root`) $ `git add . -u -n`
- check that the files listed are what you changed and intend to push upstream
- if yes: `$ git add . -u`
- $ `git commit -m 'description of first change'`
- $ `git push origin master`
- $ `firefox https://codeberg.org/crimeflare/cloudflare-tor`
- make a new pull request
Notice that only the git clone
command has a torsocks
prefix and
all git commands thereafter do not. Whenever git operates on the
cloudflare-tor project, all connections to NAB are automatically over
Tor with this configuration (because the url
in .git/config
references the virtual host notabug-snowden
in ~/.ssh/config
which
uses the onion address).