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

helper fails before it gets a chance to ask me for password #47

Closed
yacoob opened this issue Nov 2, 2020 · 0 comments
Closed

helper fails before it gets a chance to ask me for password #47

yacoob opened this issue Nov 2, 2020 · 0 comments

Comments

@yacoob
Copy link

yacoob commented Nov 2, 2020

I'm trying to git clone a repository that stores images on Netlify's LFS. With helper set up, I get:

03:30:49.483279 trace git-lfs: HTTP: 401


< HTTP/1.1 401 Unauthorized
< Content-Length: 67
< Age: 1
< Alt-Svc: clear
< Connection: keep-alive
< Content-Type: application/json
< Date: Mon, 02 Nov 2020 03:30:52 GMT
< Server: Netlify
< Vary: Origin
< Via: 1.1 google
< X-Nf-Request-Id: f9be4180-d125-494b-a0c9-d922a54f001e-7831549
<
03:30:49.483531 trace git-lfs: HTTP: {"code":401,"msg":"This endpoint requires an Authorization header"}
{"code":401,"msg":"This endpoint requires an Authorization header"}03:30:49.483606 trace git-lfs: setting repository access to basic
03:30:49.483646 trace git-lfs: exec: git 'config' '--replace-all' 'lfs.https://39fb5576-3cb9-4a94-b61c-4e9eb0fd9108.netlify.com/.netlify/large-media.access' 'basic'
03:30:49.485234 trace git-lfs: setting repository access to basic
03:30:49.485280 trace git-lfs: exec: git 'config' '--replace-all' 'lfs.https://39fb5576-3cb9-4a94-b61c-4e9eb0fd9108.netlify.com/.netlify/large-media.access' 'basic'
03:30:49.486518 trace git-lfs: api: http response indicates "basic" authentication. Resubmitting...
03:30:49.486687 trace git-lfs: creds: git credential fill ("https", "39fb5576-3cb9-4a94-b61c-4e9eb0fd9108.netlify.com", "")
03:30:49.487594 git.c:418               trace: built-in: git credential fill
03:30:49.487746 run-command.c:643       trace: run_command: 'git credential-netlify get'
03:30:49.488966 git.c:669               trace: exec: git-credential-netlify get
03:30:49.489004 run-command.c:643       trace: run_command: git-credential-netlify get
time="2020-11-02T03:30:49Z" level=debug msg="Initializing Netlify credential helper" args="[/home/yacoob/bin/git-credential-netlify get]"
time="2020-11-02T03:30:49Z" level=debug msg="Git input received" host=39fb5576-3cb9-4a94-b61c-4e9eb0fd9108.netlify.com protocol=https
time="2020-11-02T03:30:49Z" level=error msg="Aborting Netlify credential helper execution" error="open /home/yacoob/.config/netlify.json: no such file or directory"
Username for 'https://39fb5576-3cb9-4a94-b61c-4e9eb0fd9108.netlify.com': _

I'm not logged in, so there's no config file to read the credentials from. However, the helper fails after discovering that, instead of asking me for the login and password. The subsequent prompt for username comes from git itself.

My go-fu is pretty poor, but it looks to me like the problem lies in getAccessToken. It calls loadAccessToken which tries four different files (validAuthPaths) and fails to find any of them. As a result, it returns the last error it has noted ("open /home/yacoob/.config/netlify.json: no such file or directory") at l.148 and exits getAccessToken, before it can get to l.157 which would ask for the credentials.

The asking for credentials is broken as well, according to this bug but that's a separate problem :D

@yacoob yacoob closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2024
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

No branches or pull requests

1 participant