PSA: Reminder that Github is not the only Bitcoin Source Repo

Github (@Microsoft) is a great site, and they have, for the most part, been pretty laissez-faire about repos that the "powers that be" might object to. But any skeptical mind should always "what if" anything as important as the Bitcoin-Core codebase. Assuming you've done all the basic stuff like build-from-source and run your own node, now might be a good time to add some mirrors to your list of git remotes.

The best mirror I can think of is probably the onion mirror maintained by @laanwj (github). If there are some others that are replicated regularly, please help me collect the list.

If we "start from scratch" I'll add the github-git as the default remote named "origin" and add the onion-git as the remote named "onion". Of course you can change the names if they are too close for your liking.

Initially clone the repo from github (github-git -> "origin")

# This will create "origin" and checkout "master" git clone https://github.com/bitcoin/bitcoin.git cd bitcoin

Add the Onion-Git as one of our remotes

o_host=nxshomzlgqmwfwhcnyvbznyrybh3gotlfgis7wkv7iur2yj2rarlhiad.onion git remote add onion http://$o_host/git/bitcoin.git git config --local --add remote.onion.proxy "socks5h://127.0.0.1:9050"

Create a branch "onion-master" that tracks our new remote

git fetch onion git checkout -b onion-master onion/master

Go back to "origin/master" and compare

git checkout master git branch -vv # Should see origin/master and onion/master at the same commit

Now if Github does any shenanigans with the repo, you can pull from the onion repo. It should be noted that the onion repo is read-only, but I'm sure if anything goes wierd there will be about a half dozen new repos pop up. But at least this one is an authoritative source.

Onion URL References:

submitted by /u/brianddk
[link] [comments]

Comments