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

terminal prompts disabled #728

Closed
Ulrar opened this issue May 29, 2024 · 17 comments · Fixed by #737
Closed

terminal prompts disabled #728

Ulrar opened this issue May 29, 2024 · 17 comments · Fixed by #737
Labels
bug Something isn't working

Comments

@Ulrar
Copy link

Ulrar commented May 29, 2024

Describe the bug
The original issue was #621 but that's been closed. The newest release does not panic anymore, but as indicated in that now closed issue it left it's place to a new problem :

time="2024-05-29T15:47:24Z" level=error msg="`git fetch origin --tags --force` failed exit status 128: error: cannot run argocd: No such file or directory\nfatal: could not read Username for '<my git repo>': terminal prompts disabled" execID=d3b0c

Downgrading back to 0.12 fixes the issue.

Version
v0.13.1

@Ulrar Ulrar added the bug Something isn't working label May 29, 2024
@CygnusHyoga
Copy link

I'm having the same problem with original issue #621 in v0.13, after update to v0.13.1, I get the "terminal prompts disabled" error.

@pasha-codefresh
Copy link
Collaborator

pasha-codefresh commented May 30, 2024

@jannfis reworked this part completely here, but we planned release it as part of v0.14 , If issue still exists, probably we will cherry pick this change into v0.13 . @jannfis thoughts on it ?

@jannfis
Copy link
Contributor

jannfis commented May 31, 2024

@pasha-codefresh It's a big change, and imho should go into 0.14. We could go ahead and release a 0.14 soon, though. I do not see any issue with that :)

@clambin
Copy link

clambin commented May 31, 2024

same here. automatic upgrades are completely broken for me in v0.13.1.

@srihas619
Copy link

Since #726 is merged, I thought I could build and test the latest master however I ended up with these errors still. I am using GitHub App creds.

Am I missing something alongside changes in that PR? @jannfis / @pasha-codefresh could you help?

Image Updater Logs
level=trace msg="processing app 'web2' of type 'Helm'" application=web2
level=info msg="Starting image update cycle, considering 1 annotated application(s) for update"
level=debug msg="Processing application web2"
level=debug msg="Considering this image for update" alias=argo-play application=web2 image_name=<redacted>/argo-play image_tag=v1 registry=
level=debug msg="Using no version constraint when looking for a new tag" alias=argo-play application=web2 image_name=<redacted>/argo-play image_tag=v1 registry=
level=trace msg="No sort option found" image_alias=argo-play image_name=<redacted>/argo-play registry_url=
level=trace msg="No match annotation found" image_alias=argo-play image_name=<redacted>/argo-play registry_url=
level=trace msg="No ignore-tags annotation found" image_alias=argo-play image_name=<redacted>/argo-play registry_url=
level=trace msg="Using runtime platform constraint linux/arm64" image_alias=argo-play image_name=<redacted>/argo-play registry_url=
level=trace msg="No pull-secret annotation found" image_alias=argo-play image_name=<redacted>/argo-play registry_url=
level=trace msg="Performing HTTP GET https://registry-1.docker.io/v2/<redacted>/argo-play/tags/list"
level=trace msg="List of available tags found: [v1 v2]" alias=argo-play application=web2 image_name=<redacted>/argo-play image_tag=v1 registry=
level=trace msg="Finding out whether to consider v1 for being updateable" image="<redacted>/argo-play:v1"
level=trace msg="Finding out whether to consider v2 for being updateable" image="<redacted>/argo-play:v1"
level=debug msg="found 2 from 2 tags eligible for consideration" image="<redacted>/argo-play:v1"
level=info msg="Setting new image to <redacted>/argo-play:v2" alias=argo-play application=web2 image_name=<redacted>/argo-play image_tag=v1 registry=
level=debug msg="target parameters: image-spec= image-name=image.repository, image-tag=image.tag" application=web2 image=<redacted>/argo-play
level=info msg="Successfully updated image '<redacted>/argo-play:v1' to '<redacted>/argo-play:v2', but pending spec update (dry run=false)" alias=argo-play application=web2 image_name=<redacted>/argo-play image_tag=v1 registry=
level=debug msg="Using commit message: [skip ci] build: automatic update of web2\n"
level=info msg="Committing 1 parameter update(s) for application web2" application=web2
level=info msg="Initializing https://github.com/srihas619/argocd-local to /tmp/git-web22660430708"
level=info msg="git fetch origin --tags --force --prune" dir=/tmp/git-web22660430708 execID=b2f57
level=error msg="`git fetch origin --tags --force --prune` failed exit status 128: error: cannot run argocd: No such file or directory\nfatal: could not read Username for 'https://github.com': terminal prompts disabled" execID=b2f57
level=info msg=Trace args="[git fetch origin --tags --force --prune]" dir=/tmp/git-web22660430708 operation_name="exec git" time_ms=238.79500000000002
level=error msg="Could not update application spec: `git fetch origin --tags --force --prune` failed exit status 128: error: cannot run argocd: No such file or directory\nfatal: could not read Username for 'https://github.com': terminal prompts disabled" application=web2
level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=0 errors=1"

Thank you!

@Sovietaced
Copy link
Contributor

I am experiencing the same issue on master using GitHub App creds

@Sovietaced
Copy link
Contributor

For some reason release 0.13.1 works for me, so looks like #726 is specifically what caused this issue 🤷

@jannfis
Copy link
Contributor

jannfis commented Jun 7, 2024

Found the issue and have a fix up.

@jannfis
Copy link
Contributor

jannfis commented Jun 7, 2024

I think this bug hits only if you use an HTTPS based repository configuration. @Sovietaced, are you by chance using SSH connected repositories?

@Sovietaced
Copy link
Contributor

I think this bug hits only if you use an HTTPS based repository configuration. @Sovietaced, are you by chance using SSH connected repositories?

I am using repositories setup with GitHub app credentials with an HTTPS URL.

@zagr0
Copy link

zagr0 commented Jun 13, 2024

Is there any workaround for that?
Annotation does not work anymore: argocd-image-updater.argoproj.io/write-back-method: git:secret:argocd/git-creds

@alexismaior
Copy link

Is this fixed anyway? Running the latest build I'm still getting:

level=error msg="Could not update application spec: git fetch origin --tags --force --prune failed exit status 128: time=\"2024-06-18T17:51:35Z\" level=fatal msg=\"ARGOCD_GIT_ASKPASS_NONCE is not set\"\nerror: unable to read askpass response from '/usr/local/bin/argocd-image-updater'\nfatal: could not read Username for 'https://github.xxxx': terminal prompts disabled" application=test-app

Annotations:

  annotations: 
   argocd-image-updater.argoproj.io/image-list: app=myrepo/app
   argocd-image-updater.argoproj.io/app.allow-tags: regexp:^[0-9]+.[0-9]+.[0-9]+-[0-9a-f]{7}$  
   argocd-image-updater.argoproj.io/app.helm.image-name: app.image.repository
   argocd-image-updater.argoproj.io/app.helm.image-tag: app.image.tag
   argocd-image-updater.argoproj.io/write-back-method: git:secret:argocd-image-updater/git-creds
   argocd-image-updater.argoproj.io/git-repository: https://github.xxxxx
   argocd-image-updater.argoproj.io/write-back-target: "helmvalues:../../values.yaml"
   argocd-image-updater.argoproj.io/git-branch: master:image-updater{{range .Images}}-{{.Name}}-{{.NewTag}}{{end}} 

@jannfis
Copy link
Contributor

jannfis commented Jun 23, 2024

Thanks for testing and reporting, @alexismaior. Will dig into again.

@benfuu
Copy link
Contributor

benfuu commented Jun 24, 2024

@alexismaior @jannfis could you test with the latest image? I tested this with my PR #756 and this should be working now.

@alexismaior
Copy link

Yep. Tested with both HTTPS and SSH git credentials and the image updater was able to write back to git. Thanks, folks, for working on this.

@alexismaior
Copy link

Are there any plans to release v0.13.2 in the short term with this fix? :D

@chengfang
Copy link
Collaborator

Are there any plans to release v0.13.2 in the short term with this fix? :D

See #748 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.