NAME
git-annex p2p - configure peer-2-peer links between repositories
SYNOPSIS
git annex p2p [options]
DESCRIPTION
This command can be used to link git-annex repositories over peer-2-peer networks.
git-annex includes built-in support to use Tor hidden services as a P2P network. (This needs Tor to be installed.)
git-annex can also support other P2P networks, using a helper program
that you can install. These programs have names of the form
git-annex-p2p-<netname>
. See
https://git-annex.branchable.com/special_remotes/p2p/
for details.
OPTIONS
--enable <netname>
Enable using the P2P network with the specified name.
For networks other than tor, this needs the helper program
git-annex-p2p-<netname>
to be installed.After this command is run,
git annex remotedaemon
can be run to serve incoming connections from peers, andgit-annex p2p --pair
orgit-annex p2p --gen-addresses
can be run to give other users access to your repository via the P2P network.--pair
Run this in two repositories to pair them together over the P2P network.
This will print out a code phrase, like "3-mango-elephant", and will prompt for you to enter the code phrase from the other repository.
Once code phrases have been exchanged, the two repositories will be paired. A git remote will be created for the other repository, with a name like "peer1".
This uses Magic Wormhole to verify the code phrases and securely communicate the P2P addresses of the repositories, so you will need it installed on both computers that are being paired.
This feature was present in a broken form in git-annex versions before version 6.20180705. Make sure that a new enough git-annex is installed on both computers that are being paired.
--gen-addresses
Generates addresses that can be used to access this git-annex repository over the available P2P networks. The address or addresses is output to stdout.
Note that anyone who knows these addresses can access your repository over the P2P networks.
This can be run repeatedly, in order to give different addresses out to different people.
--link
Sets up a git remote that is accessed over a P2P network.
This will prompt for an address to be entered; you should paste in the address that was generated by --gen-addresses in the remote repository.
Defaults to making the git remote be named "peer1", "peer2", etc. This can be overridden with the
--name
option.--name
Specify a name to use when setting up a git remote with
--link
or--pair
.Also the git-annex-common-options(1) can be used.
SEE ALSO
git-annex(1)
wormhole(1)
AUTHOR
Joey Hess id@joeyh.name
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
Is there a good reason why
git annex p2p --link
will accept addresses that points to itself?I'm trying to script automatic addition of .onion peers, and it's a bit annoying to have to filter the .onion pointing to the current repo instead of just adding all of the .onion urls and having it ignore/warn/fail on the one that is currently in .git/annex/creds/p2paddrs