You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logrus.Debugf("Looking in ssh directory at path %q for keys.", privateKeyDir)
103
107
104
-
// Ask if we should look at the private keys
108
+
// Ask whether to load private keys or provide own key
109
+
options:= []string{
110
+
"Load private ssh keys from "+privateKeyDir,
111
+
"Provide your own key",
112
+
"No, I will add them later if necessary.",
113
+
}
105
114
message:=`The CI/CD pipeline needs access to the git repos in order to clone, build and push.
106
115
If any of the repos require ssh keys you will need to provide them.
107
-
Do you want to load the private ssh keys from [%s]?:`
108
-
ans:=qaengine.FetchBoolAnswer(common.ConfigRepoLoadPrivKey, fmt.Sprintf(message, privateKeyDir), []string{"No, I will add them later if necessary."}, false, nil)
logrus.Errorf("Failed to read the ssh directory at path %q Error: %q", privateKeyDir, err)
118
-
return
139
+
returnfmt.Errorf("failed to read the SSH directory at path %q: %w", directory, err)
119
140
}
141
+
120
142
iflen(finfos) ==0 {
121
-
logrus.Warn("No key files where found in", privateKeyDir)
122
-
return
143
+
logrus.Warn("No key files were found in", directory)
144
+
returnnil
123
145
}
146
+
124
147
filenames:= []string{}
125
148
for_, finfo:=rangefinfos {
126
149
filenames=append(filenames, finfo.Name())
127
150
}
128
-
filenames=qaengine.FetchMultiSelectAnswer(common.ConfigRepoKeyPathsKey, fmt.Sprintf("These are the files we found in %q . Which keys should we consider?", privateKeyDir), []string{"Select all the keys that give access to git repos."}, filenames, filenames, nil)
0 commit comments