implement p2p command
This commit is contained in:
parent
ac0cb5c2cc
commit
bfc8305814
10 changed files with 110 additions and 33 deletions
|
@ -44,7 +44,7 @@ repository:
|
|||
|
||||
Now, tell the new peer about the address of the first peer:
|
||||
|
||||
git annex p2p --link-remote peer1 tor-annnex::eeaytkuhaupbarfi.onion:4412:7f53c5b65b8957ef626fd461ceaae8056e3dbc459ae715e4
|
||||
git annex p2p --link tor-annnex::eeaytkuhaupbarfi.onion:4412:7f53c5b65b8957ef626fd461ceaae8056e3dbc459ae715e4 --named peer1
|
||||
|
||||
(Of course, you should paste in the address you generated earlier,
|
||||
not the example one shown above.)
|
||||
|
@ -56,8 +56,8 @@ You can run any commands you normally would to sync with that remote:
|
|||
git annex sync --content peer1
|
||||
|
||||
You can also generate an address for this new peer, by running `git annex
|
||||
p2p --gen-address`, and add that address to other peers using `git annex
|
||||
p2p --link-remote`. It's often useful to link peers up in both directions,
|
||||
p2p --gen-address`, and link other peers to that address using `git annex
|
||||
p2p --link`. It's often useful to link peers up in both directions,
|
||||
so peer1 is a remote of peer2 and peer2 is a remote of peer1.
|
||||
|
||||
Any number of peers can be connected this way, within reason.
|
||||
|
@ -88,14 +88,14 @@ You can `git pull`, push, etc with those onion addresses:
|
|||
git remote add peer1 tor-annnex::eeaytkuhaupbarfi.onion:4412
|
||||
|
||||
Onion addresses are semi-public. When you add a remote, they appear in your
|
||||
`.git/config` file. So, there's a second level of authentication that
|
||||
git-annex uses to make sure that only people you want to can access your
|
||||
repository over Tor. That takes the form of a long string of numbers and
|
||||
letters, like "7f53c5b65b8957ef626fd461ceaae8056e3dbc459ae715e4".
|
||||
`.git/config` file. For security, there's a second level of authentication
|
||||
that git-annex uses to make sure that only people you want to can access
|
||||
your repository over Tor. That takes the form of a long string of numbers
|
||||
and letters, like "7f53c5b65b8957ef626fd461ceaae8056e3dbc459ae715e4".
|
||||
|
||||
The addresses generated by `git annex peer --gen-address`
|
||||
combine the onion address with the authentication data.
|
||||
|
||||
When you run `git annex peer --link-remote`, it sets up a git remote using
|
||||
When you run `git annex peer --link`, it sets up a git remote using
|
||||
the onion address, and it stashes the authentication data away in a file in
|
||||
`.git/annex/creds/`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue