mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-21 23:21:48 +00:00
Gets actual path for owner
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
parent
96d8ec2016
commit
4fcf93306a
1 changed files with 10 additions and 6 deletions
|
|
@ -129,7 +129,16 @@ 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 {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
repository, err := git.NewRepository(glRepository, owner, glHostname, glToken, "flux", glOwner+"@users.noreply.gitlab.com")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
@ -138,11 +147,6 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error {
|
||||||
repository.SSHHost = glSSHHostname
|
repository.SSHHost = glSSHHostname
|
||||||
}
|
}
|
||||||
|
|
||||||
provider := &git.GitLabProvider{
|
|
||||||
IsPrivate: glPrivate,
|
|
||||||
IsPersonal: glPersonal,
|
|
||||||
}
|
|
||||||
|
|
||||||
tmpDir, err := ioutil.TempDir("", namespace)
|
tmpDir, err := ioutil.TempDir("", namespace)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue