git-annex/doc/git-annex-p2p.mdwn
Joey Hess 3037feb1bf
p2p --link now defaults to setting up a bi-directional link
Both the local and remote git repositories get remotes added
pointing at one-another.

Makes pairing twice as easy!

Security: The new LINK command in the protocol can be sent repeatedly,
but only by a peer who has authenticated with us. So, it's entirely safe to
add a link back to that peer, or to some other peer it knows about.
Anything we receive over such a link, the peer could send us over the
current connection.

There is some risk of being flooded with LINKs, and adding too many
remotes. To guard against that, there's a hard cap on the number of remotes
that can be set up this way. This will only be a problem if setting up
large p2p networks that have exceptional interconnectedness.

A new, dedicated authtoken is created when sending LINK.

This also allows, in theory, using a p2p network like tor, to learn about
links on other networks, like telehash.

This commit was sponsored by Bruno BEAUFILS on Patreon.
2016-12-16 16:38:06 -04:00

54 lines
1.2 KiB
Markdown

# 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.
Currently, the only P2P network supported by git-annex is Tor hidden
services.
# OPTIONS
* `--gen-address`
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.
* `--link`
Sets up a link with a peer over the 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.
A git remote will be created, with a name like "peer1", "peer2"
by default (the `--name` option can be used to specify the name).
The link is bi-directional, so the peer will also have a git
remote added to it, linking back to the repository where this is run.
* `--name`
Specify a name to use when setting up a git remote.
# SEE ALSO
[[git-annex]](1)
[[git-annex-enable-tor]](1)
[[git-annex-remotedaemon]](1)
# AUTHOR
Joey Hess <id@joeyh.name>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.