|
|
@ -133,10 +133,10 @@ func createSecretGitCmdRun(cmd *cobra.Command, args []string) error {
|
|
|
|
return err
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
secret.Data = map[string][]byte{
|
|
|
|
secret.StringData = map[string]string{
|
|
|
|
"identity": pair.PrivateKey,
|
|
|
|
"identity": string(pair.PrivateKey),
|
|
|
|
"identity.pub": pair.PublicKey,
|
|
|
|
"identity.pub": string(pair.PublicKey),
|
|
|
|
"known_hosts": hostKey,
|
|
|
|
"known_hosts": string(hostKey),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if !createArgs.export {
|
|
|
|
if !createArgs.export {
|
|
|
@ -148,9 +148,9 @@ func createSecretGitCmdRun(cmd *cobra.Command, args []string) error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: add cert data when it's implemented in source-controller
|
|
|
|
// TODO: add cert data when it's implemented in source-controller
|
|
|
|
secret.Data = map[string][]byte{
|
|
|
|
secret.StringData = map[string]string{
|
|
|
|
"username": []byte(secretGitArgs.username),
|
|
|
|
"username": secretGitArgs.username,
|
|
|
|
"password": []byte(secretGitArgs.password),
|
|
|
|
"password": secretGitArgs.password,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
return fmt.Errorf("git URL scheme '%s' not supported, can be: ssh, http and https", u.Scheme)
|
|
|
|
return fmt.Errorf("git URL scheme '%s' not supported, can be: ssh, http and https", u.Scheme)
|
|
|
|