Add SkipSSHKey field to LoginOptions
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
This commit is contained in:
parent
3be7a02fec
commit
3a3450fec5
1 changed files with 15 additions and 14 deletions
|
|
@ -28,19 +28,20 @@ type iconfig interface {
|
|||
}
|
||||
|
||||
type LoginOptions struct {
|
||||
IO *iostreams.IOStreams
|
||||
Config iconfig
|
||||
HTTPClient *http.Client
|
||||
GitClient *git.Client
|
||||
Hostname string
|
||||
Interactive bool
|
||||
Web bool
|
||||
Scopes []string
|
||||
Executable string
|
||||
GitProtocol string
|
||||
Prompter Prompt
|
||||
Browser browser.Browser
|
||||
SecureStorage bool
|
||||
IO *iostreams.IOStreams
|
||||
Config iconfig
|
||||
HTTPClient *http.Client
|
||||
GitClient *git.Client
|
||||
Hostname string
|
||||
Interactive bool
|
||||
Web bool
|
||||
Scopes []string
|
||||
Executable string
|
||||
GitProtocol string
|
||||
Prompter Prompt
|
||||
Browser browser.Browser
|
||||
SecureStorage bool
|
||||
SkipSSHKeyPrompt bool
|
||||
|
||||
sshContext ssh.Context
|
||||
}
|
||||
|
|
@ -84,7 +85,7 @@ func Login(opts *LoginOptions) error {
|
|||
|
||||
var keyToUpload string
|
||||
keyTitle := defaultSSHKeyTitle
|
||||
if opts.Interactive && gitProtocol == "ssh" {
|
||||
if opts.Interactive && !opts.SkipSSHKeyPrompt && gitProtocol == "ssh" {
|
||||
pubKeys, err := opts.sshContext.LocalPublicKeys()
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue