implement p2p --link

This commit was sponsored by Riku Voipio.
This commit is contained in:
Joey Hess 2016-11-30 15:14:54 -04:00
parent bfc8305814
commit 3ab12ba923
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
4 changed files with 84 additions and 40 deletions

View file

@ -22,11 +22,13 @@ services.
over the available P2P networks. The address or addresses is output to
stdout.
* `--link address --named remotename`
* `--link remotename`
Sets up a git remote with the specified remotename that is accessed over
a P2P network. The address is one generated in the remote repository using
`git annex p2p --gen-address`
a P2P network.
This will prompt for an address to be entered; you should paste in the
address that was generated by --gen-address in the remote repository.
# SEE ALSO

View file

@ -42,16 +42,17 @@ repository:
sudo git annex enable-tor
git annex remotedaemon
Now, tell the new peer about the address of the first peer:
Now, tell the new peer about the address of the first peer.
This will make a git remote named "peer1", which connects,
through Tor, to the repository on the other peer.
git annex p2p --link tor-annnex::eeaytkuhaupbarfi.onion:4412:7f53c5b65b8957ef626fd461ceaae8056e3dbc459ae715e4 --named peer1
git annex p2p --link peer1
(Of course, you should paste in the address you generated earlier,
not the example one shown above.)
That command will prompt for an address; paste in the address that was
generated on the first peer, and then press Enter.
Now this git-annex repository will have a remote named "peer1"
which connects, through Tor, to the repository on the other peer.
You can run any commands you normally would to sync with that remote:
Now you can run any commands you normally would to sync with the
peer1 remote:
git annex sync --content peer1