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
Authentication not retrieved / prompted upon redirect #3025
Comments
|
Hi @ashmckenzie, thanks for opening this issue. My reading of this indicates that Git LFS does not re-authenticate subsequent HTTP requests after being redirected. Looking at the implementation in package I think that the diff you attached is on the right track, but I don't think that it's the entire fix that I'd like to merge. One thing in particular is that I wrote an implementation of this in https://github.com/git-lfs/git-lfs/tree/lfsapi-authenticate-redirects, and I would be grateful if you could run it yourself and let me know whether it works as expected or not. Here are some builds with that change applied: git-lfs-darwin-386-2.4.0.tar.gz |
|
Here's a pull-request that fixes the issue: #3028. |
|
Amazing speedy work @ttaylorr ! Have confirmed in my scenario this fixes the issue I'm seeing 👍 💯 |
|
Well done mate, top job! We are very grateful :) |
Hello from GitLab :)
I've observed an issue where a HTTP 302 redirect is detected (https://github.com/git-lfs/git-lfs/blob/master/lfsapi/client.go#L372) but the new HTTP request results in a 401 because authentication is not attempted.
In my scenario, I'm attempting a
git lfs -r secondary lock|unlockwhere the secondary remote is defined as:GitLab is running at
http://localhost:3002and is configured as a secondary (https://docs.gitlab.com/ee/administration/geo/replication/#overview) and is therefore not able to accept DB writes. We have the necessary HTTP redirect logic implemented to redirect to the primary (http://localhost:3001) and is working as expected for git, but we're seeing some issues with git lfs:git lfs lock -r secondaryattempt:If however I make the following change (admittedly with a hardcoded remote of
secondary), it works as expected. It even correctly approves the credentials for both secondary and primary so subsequent calls do not prompt for auth:Diff:
Output:
Please help, thanks :)
The text was updated successfully, but these errors were encountered: