Tuesday 27 October 2020

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 lassie fair 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://bit.ly/2mNu3xW cd bitcoinAdd the Onion-Git as one of our remoteso_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 remotegit fetch onion git checkout -b onion-master onion/masterGo back to "origin/master" and comparegit checkout master git branch -vv # Should see origin/master and onion/master at the same commitNow 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:Git Announce: https://bit.ly/35G6ZGj Announce: https://bit.ly/2HDaTY2 onion: https://bit.ly/2TsCKwL onion: https://bit.ly/3jADevk via /r/Bitcoin https://bit.ly/3dXLrJ0

No comments :

Post a Comment