Skip to content

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

Merged
merged 1 commit into from
Feb 25, 2016

Conversation

alexcrichton
Copy link
Member

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

@rust-highfive
Copy link

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

r? @brson

@rust-highfive rust-highfive assigned brson and unassigned huonw Feb 22, 2016
}
UsernameAttempt::Local => {
username_attempt = UsernameAttempt::Git;
env::var("USER").ok()
Copy link
Contributor

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.

@alexcrichton alexcrichton force-pushed the better-failed-auth-error branch from 5f9c3f1 to c6149e3 Compare February 23, 2016 01:30
@brson
Copy link
Contributor

brson commented Feb 25, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Feb 25, 2016

📌 Commit c6149e3 has been approved by brson

@bors
Copy link
Contributor

bors commented Feb 25, 2016

⌛ Testing commit c6149e3 with merge 627855a...

@bors
Copy link
Contributor

bors commented Feb 25, 2016

💔 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
@alexcrichton alexcrichton force-pushed the better-failed-auth-error branch from c6149e3 to f66d716 Compare February 25, 2016 00:40
@alexcrichton
Copy link
Member Author

@bors: r=brson f66d716

@bors
Copy link
Contributor

bors commented Feb 25, 2016

⌛ Testing commit f66d716 with merge e721289...

bors added a commit that referenced this pull request Feb 25, 2016
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
@bors
Copy link
Contributor

bors commented Feb 25, 2016

@bors bors merged commit f66d716 into rust-lang:master Feb 25, 2016
@alexcrichton alexcrichton deleted the better-failed-auth-error branch February 29, 2016 22:12
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

Successfully merging this pull request may close these issues.

6 participants