-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Auth with more usernames and improve errors #2407
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
Conversation
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
r? @brson |
} | ||
UsernameAttempt::Local => { | ||
username_attempt = UsernameAttempt::Git; | ||
env::var("USER").ok() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Windows, the local username is stored in the %USERNAME%
environment variable. %USER%
is not generally set.
5f9c3f1
to
c6149e3
Compare
@bors r+ |
📌 Commit c6149e3 has been approved by |
⌛ Testing commit c6149e3 with merge 627855a... |
💔 Test failed - cargo-linux-64 |
This commit is an attempt to improve the error message from failed authentication attempts as well as attempting more usernames. Right now we only attempt one username, but there are four different possible choices we could select (including $USER which we weren't previously trying). This commit tweaks a bunch of this logic and just in general refactors the with_authentication function. Closes rust-lang#2399
c6149e3
to
f66d716
Compare
This commit is an attempt to improve the error message from failed authentication attempts as well as attempting more usernames. Right now we only attempt one username, but there are four different possible choices we could select (including $USER which we weren't previously trying). This commit tweaks a bunch of this logic and just in general refactors the with_authentication function. Closes #2399
☀️ Test successful - cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64 |
This commit is an attempt to improve the error message from failed
authentication attempts as well as attempting more usernames. Right now we only
attempt one username, but there are four different possible choices we could
select (including $USER which we weren't previously trying).
This commit tweaks a bunch of this logic and just in general refactors the
with_authentication function.
Closes #2399