Gets actual path for owner

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
pull/681/head
Somtochi Onyekwere 4 years ago
parent 96d8ec2016
commit 4fcf93306a

@ -129,18 +129,22 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error {
return fmt.Errorf("cluster already bootstrapped to %v path", usedPath) return fmt.Errorf("cluster already bootstrapped to %v path", usedPath)
} }
repository, err := git.NewRepository(glRepository, glOwner, glHostname, glToken, "flux", glOwner+"@users.noreply.gitlab.com") provider := &git.GitLabProvider{
IsPrivate: glPrivate,
IsPersonal: glPersonal,
}
owner, err := provider.GetRepositoryOwner(ctx, glToken, glOwner)
if err != nil { if err != nil {
return err return err
} }
if glSSHHostname != "" { repository, err := git.NewRepository(glRepository, owner, glHostname, glToken, "flux", glOwner+"@users.noreply.gitlab.com")
repository.SSHHost = glSSHHostname if err != nil {
return err
} }
provider := &git.GitLabProvider{ if glSSHHostname != "" {
IsPrivate: glPrivate, repository.SSHHost = glSSHHostname
IsPersonal: glPersonal,
} }
tmpDir, err := ioutil.TempDir("", namespace) tmpDir, err := ioutil.TempDir("", namespace)

Loading…
Cancel
Save