Avoid having ssh-agent a hard dependency of `rad-auth`.
Only add the user's key in `auth::init()` to ssh-agent if it is running,
instead of exiting with error.
For `auth::authenticate()` which is used to authenticate the user with
Radicle, assume using `RAD_PASSPHRASE` is a fallback authentication
method. If ssh-agent is not-detected, verify the RAD_PASSPHRASE is
present and correct. Treat neither being present as an error.
Support this by clarifying on `ssh::agent::connect()`s error which are
due to it not being present.
Trying to open or update Patch will fail if the user's working copy is
out of sync with the Radicle projects canonical head.
Fix this by always operating on the storage when opening or
updating a patch.
It wasn't being set correctly, and it's not the place for it,
so we remove it and set it in `httpd`.
Note that `Remote` is now simply a wrapper around `SignedRefs`.
If we want to remove the type or turn it into an alias, it will
require touching lots of different parts of the codebase. I opted
not to do that here as it's lower priority.
When tracking a repository with the `--fetch` option, we run a fetch
once the tracking is done.
When tracking nodes, we don't accept the `--fetch` flag, as there may
not be a repository to fetch.
This commit fixes the inconsistency with the `rad patch` command,
which previously displayed an empty table when there were no issues. Now,
the CLI will display a message indicating that there are no issues to display.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Instead of `Node::announce_refs`, we call `rad sync` to have the
terminal block while waiting for nodes to fetch the changes.
We also change the use of `git push` in the patch command to not
trigger syncing in that case.
This command announces refs to peers and waits for them to be
in sync.
Adds a subscribe method to `Handle` so that we can get the events
from the seed to allow us to confirm that the configured seeds fetched
from us.
Implementing the `rad remote rm` command in order to be able
to remote a remote inside the radicle remote list.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Implementing the `rad remote list` command in order to be able to
list all the radicle remotes added to the repository
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
implementing the `rad remote add` command in order
to be able to add rad remotes from the command
line.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commits introduces just a couple of helper functions in order
to work with the `rad remote *` commands.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
A repository may fail to load when trying to run `rad ls`, but the
failure will be hidden from the output.
Add a `--verbose` flag to add warning information to stdout when a
repository fails to load.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
Add a `rad fork` command to create a forked namespace, using the local
peer, for the given repository.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
A project may exist within storage without the local operator not
having a fork of the project.
Use Doc::canonical in rad inspect to retrieve the canonical identity
document for use during inspection.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
Reduce friction when merging patches by automatically fetching the
Patch's commit head if its missing.
The calls git directly due to difficulties fetch the revision
anonymously with existing method. Its important to fetch the commit
anonymously to remove dependency on how the local 'git remote's are
configured.
Fetch project information using the delegates fork of the project. This
avoids expecting a user's fork to exist locally.
Delegate project information is expected to remain in sync.
Consider our command line version output part of our API via a function
comment.
Test the first two fields of the version output are the program name and
a semantic version.
Instead of returning the namespaces that we fetched with,
we return the remotes that were actually fetched from.
This can differ if some trusted peers were not available
on the remote node.
Previously, if that was the case, it would cause errors
since the remotes were looked up and that lookup failed.
* Properly remove review help message from review
* Remove `--no-confirm` and confirmation step
The CLI should be mostly non-interactive for day-to-day commands,
keeping the interactivity for the TUI.