docs: better "server add" help output
This commit is contained in:
parent
d787f71215
commit
1a12bef53e
@ -95,23 +95,19 @@ var serverAddCommand = cli.Command{
|
||||
Description: `
|
||||
Add a new server to your configuration so that it can be managed by Abra.
|
||||
|
||||
Abra uses the SSH command-line to discover connection details for your server.
|
||||
It is advised to configure an entry per-host in your ~/.ssh/config for each
|
||||
server. For example:
|
||||
Abra relies on the standard SSH command-line and ~/.ssh/config for client
|
||||
connection details. You must configure an entry per-host in your ~/.ssh/config
|
||||
for each server. For example:
|
||||
|
||||
Host example.com example
|
||||
Hostname example.com
|
||||
User exampleUser
|
||||
Port 12345
|
||||
IdentityFile ~/.ssh/example@somewhere
|
||||
Host example.com example
|
||||
Hostname example.com
|
||||
User exampleUser
|
||||
Port 12345
|
||||
IdentityFile ~/.ssh/example@somewhere
|
||||
|
||||
Abra can then load SSH connection details from this configuratiion with:
|
||||
You can then add a server like so:
|
||||
|
||||
abra server add example.com
|
||||
|
||||
Or using the name "example" which is not resolvable on the public Internet:
|
||||
|
||||
abra server add -D example
|
||||
abra server add example.com
|
||||
|
||||
If "--local" is passed, then Abra assumes that the current local server is
|
||||
intended as the target server. This is useful when you want to have your entire
|
||||
@ -119,8 +115,10 @@ Co-op Cloud config located on the server itself, and not on your local
|
||||
developer machine. The domain is then set to "default".
|
||||
|
||||
You can also pass "--no-domain-checks/-D" flag to use any arbitrary name
|
||||
instead of a real domain. Host will be resolved with the "hostname" entry of
|
||||
your SSH configuration. Checks for a valid online domain will be skipped.
|
||||
instead of a real domain. The host will be resolved with the "Hostname" entry
|
||||
of your ~/.ssh/config. Checks for a valid online domain will be skipped:
|
||||
|
||||
abra server add -D example
|
||||
`,
|
||||
Flags: []cli.Flag{
|
||||
internal.DebugFlag,
|
||||
@ -129,7 +127,7 @@ your SSH configuration. Checks for a valid online domain will be skipped.
|
||||
localFlag,
|
||||
},
|
||||
Before: internal.SubCommandBefore,
|
||||
ArgsUsage: "<domain>",
|
||||
ArgsUsage: "<name>",
|
||||
Action: func(c *cli.Context) error {
|
||||
if len(c.Args()) > 0 && local || !internal.ValidateSubCmdFlags(c) {
|
||||
err := errors.New("cannot use <domain> and --local together")
|
||||
|
Loading…
x
Reference in New Issue
Block a user