Commit cdafca11 authored by Kamil Trzciński's avatar Kamil Trzciński

Added ssh identity file to registration command and make ssh password optional

parent c4c771db
......@@ -2,6 +2,7 @@ v 0.4.0
- Added CI=true and GITLAB_CI=true to environment variables
- Added output_limit (in kilobytes) to runner config which allows to enlarge default build log size
- Added support for custom variables received from CI
- Added support for SSH identity file
- Optimize build path to make it shorter, more readable and allowing to fix shebang issue
- Make the debug log human readable
- Make default build log limit set to 4096 (4MB)
......
......@@ -125,9 +125,12 @@ func (s *RegistrationContext) askSSH(runnerConfig *common.RunnerConfig, serverle
if user := s.ask("ssh-user", "Please enter the SSH user (eg. root):"); user != "" {
runnerConfig.SSH.User = &user
}
if password := s.ask("ssh-password", "Please enter the SSH password (eg. docker.io):"); password != "" {
if password := s.ask("ssh-password", "Please enter the SSH password (eg. docker.io):", true); password != "" {
runnerConfig.SSH.Password = &password
}
if identityFile := s.ask("ssh-identity-file", "Please enter path to SSH identity file (eg. /home/user/.ssh/id_rsa):", true); identityFile != "" {
runnerConfig.SSH.IdentityFile = &identityFile
}
}
func (s *RegistrationContext) touchConfig() {
......@@ -370,7 +373,12 @@ func init() {
cli.StringFlag{
Name: "ssh-password",
Usage: "SSH client password",
EnvVar: "SSH_USER",
EnvVar: "SSH_PASSWORD",
},
cli.StringFlag{
Name: "ssh-identity-file",
Usage: "SSH identity file",
EnvVar: "SSH_IDENTITY_FILE",
},
},
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment