Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot initialize Azure DevOps repository during bootstrap #370

Open
antongroot opened this issue Aug 24, 2022 · 4 comments · May be fixed by #594
Open

Cannot initialize Azure DevOps repository during bootstrap #370

antongroot opened this issue Aug 24, 2022 · 4 comments · May be fixed by #594

Comments

@antongroot
Copy link

Describe the bug

Hi,

I'm bootstrapping argocd and receive a runtime error. The repository in Azure is created but not initialized while the INFO line 5 suggests it is.

To Reproduce

Set the environment vars GIT_TOKEN and GIT_REPO and run argocd-autopilot repo bootstrap.

Expected behavior

Expected an initialize repository with argocd deployment up and running.

Screenshots

Version

v0.4.5

Logs

INFO[2022-08-24T11:23:25+02:00] cloning repo: https://<redacted>/_git/argocd-bootstrap
DEBU[2022-08-24T11:23:25+02:00] cloning git repo                              url="https://<redacted>/_git/argocd-bootstrap"
DEBU[2022-08-24T11:23:25+02:00] Failed to clone repository, trying again in 3 seconds...  err="repository not found" retry=0
INFO[2022-08-24T11:23:28+02:00] repository 'https://<redacted>/_git/argocd-bootstrap' was not found, trying to create it...
INFO[2022-08-24T11:23:28+02:00] empty repository, initializing a new one with specified remote
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2aa3e8f]

goroutine 1 [running]:
github.com/argoproj-labs/argocd-autopilot/pkg/git.(*adoGit).GetDefaultBranch(0xc001c0a630, {0x433bfe8, 0xc000515dc0}, {0xc000052037, 0x10})
	/codefresh/volume/argocd-autopilot/pkg/git/provider_ado.go:95 +0xef
github.com/argoproj-labs/argocd-autopilot/pkg/git.(*repo).getDefaultBranch(0xc000523500, {0x433bfe8, 0xc000515dc0}, {0xc000052009?, 0x0?})
	/codefresh/volume/argocd-autopilot/pkg/git/repository.go:541 +0x99
github.com/argoproj-labs/argocd-autopilot/pkg/git.glob..func11({0x433bfe8, 0xc000515dc0}, 0xc0001ba280)
	/codefresh/volume/argocd-autopilot/pkg/git/repository.go:515 +0x3f7
github.com/argoproj-labs/argocd-autopilot/pkg/git.(*CloneOptions).GetRepo(0xc0001ba280, {0x433bfe8?, 0xc000515dc0})
	/codefresh/volume/argocd-autopilot/pkg/git/repository.go:234 +0x350
github.com/argoproj-labs/argocd-autopilot/cmd/commands.glob..func3({0x433bfe8?, 0xc000515dc0?}, 0x4341040?)
	/codefresh/volume/argocd-autopilot/cmd/commands/common.go:41 +0x32
github.com/argoproj-labs/argocd-autopilot/cmd/commands.RunRepoBootstrap({0x433bfe8?, 0xc000515dc0}, 0xf?)
	/codefresh/volume/argocd-autopilot/cmd/commands/repo.go:231 +0x54d
github.com/argoproj-labs/argocd-autopilot/cmd/commands.NewRepoBootstrapCommand.func2(0xc0011ef400, {0x3cef783?, 0x4?, 0x4?})
	/codefresh/volume/argocd-autopilot/cmd/commands/repo.go:149 +0x2a5
github.com/spf13/cobra.(*Command).execute(0xc0011ef400, {0xc00059c900, 0x4, 0x4})
	/codefresh/volume/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0xc0011eec80)
	/codefresh/volume/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
	/codefresh/volume/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:902
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	/codefresh/volume/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:895
main.main()
	/codefresh/volume/argocd-autopilot/cmd/main.go:26 +0x34b
@alexvonstein
Copy link

Any updates on this?

@antongroot
Copy link
Author

No sorry, still waiting for dev team to resolve.

@julianobarbosa
Copy link

julianobarbosa commented Dec 13, 2022

Hello, Any news ????

@sknopp
Copy link

sknopp commented Mar 10, 2023

Hey, i'm also looking for a valid solution for this. Azure DevOps is not a small provider.
The workarounds are really nasty and possibly break up with company compliance rules. (eg. hosting an intermediate repository on GitHub) Therefore this could be a dealbreaker for argocd usage at all

@lesomnus lesomnus linked a pull request Sep 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants