-
Notifications
You must be signed in to change notification settings - Fork 252
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
NuGet.exe push 403 handling - Incorrectly prompting for credentials #2910
Comments
We intentionally added prompting on 403. The reasoning was that if the server is returned 403, the user should be given a chance to enter different credentials. 403 generally means the server is saying "okay, I know who you are but you don't have permissions to access that resource". Therefore, a different set of credentials from the user could be used. |
That is somewhat annoying, for two reasons even 😄
|
Yup seems reasonable. I think we have two options (spoke offline with @rrelyea and @yishaigalatzer):
|
2 seems sleekest imo, but 1 may work as well. |
Time permitting, we will try to pull this in for 3.4.5. |
This fix has been committed to |
This change has now been ported to all destination branches: |
NuGet.exe is incorrectly prompting for credentials on push that results in 403 Unauthorized. I tested this against local gallery but verified it has the same behaviour against NuGet.org.
Repro steps
NuGet.exe push <package> <random-guid-api-key> -Source https://www.nuget.org/api/v2/package
Expected
NuGet.exe 2.x, 3.2.0, 3.3.0 show a 403 Forbidden with the error message.
## Actual
NuGet.exe 3.4.3, 3.4.4 and 3.5.0-beta prompt for credentials.
After 3 failed attempts, the 403 Forbidden is shown.
The text was updated successfully, but these errors were encountered: