13 Commits

Author SHA1 Message Date
7f425efa6b chore: remove deprecated io/ioutil
Signed-off-by: Dmitry Rybin <ayrowa@yandex.ru>
2021-07-30 20:51:46 +02:00
6b179aa7d9 Allow disabling the deploy key prompt for bootstrap git
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-17 15:20:49 +03:00
465ea5ccfd Update go-git to v5.4.1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-05-26 15:56:50 +02:00
fbe7050cb8 Switch to crypto/ssh for parsing of private keys
This changes the logic for the parsing of private keys, as already
done for the source-controller, so that it is able to recognize and
work with a wider range of key formats instead of returning a vague
error:

```console
$ flux bootstrap git [..]
✗ ssh: this private key is passphrase protected
```

A patch for this was already submitted and merged in `go-git/go-git`,
but is not made available in a release yet:
https://github.com/go-git/go-git/pull/298

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-05-10 15:30:25 +02:00
ea62cb5fc9 Use proper Host configuration for SSH
This removes the usage of Hostname() which does not honor configured SSH
port to be used.

Resolves: #1377
See also: #1101, #1102

Signed-off-by: Tobias Jakobsson <jakobsson.tobias@gmail.com>
2021-05-10 15:04:09 +02:00
328d403507 Set password in secret
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-04-21 17:21:07 +01:00
3aa45e72e7 Use slash target path in Git bootstrap sync opts
As otherwise (comparisons to) cluster configuration will fail due to
Separator differences. Was already fixed for provider implementations.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-21 11:48:36 +02:00
e0dd12505f Normalize paths to forward slashes
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-09 10:52:59 +02:00
7bd6aedb73 Take PK from file into account in Git bootstrap
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-08 12:06:33 +02:00
b872e595ae Add recurse submodules arg to bootstrap cmd
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-07 12:56:51 +03:00
7f0bc2ada2 Provide option to add appendix to commit messages
Using the `--commit-message-appendix` flag a string can be added to the
commit messages made by the bootstrapper process to for example skip CI
actions from executing using e.g. `[skip ci]`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-07 10:24:08 +02:00
96c373d045 Properly configure sync URL based on auth settings
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-07 10:24:08 +02:00
22648cae3b Add command to bootstrap to generic Git server
This command makes it possible to bootstrap to a generic Git server
using the local SSH agent, or a given password or private key file.

If a private key is generated, the user is prompted to give the
generated key access to the repository.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-04-07 10:24:08 +02:00