-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Display git errors during authentication. #5061
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rust_highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #5063) made this pull request unmergeable. Please resolve the merge conflicts. |
ehuss
force-pushed
the
git-error-auth
branch
from
February 21, 2018 22:33
89acd9a
to
f66fe2c
Compare
@bors: r+ Thanks! |
📌 Commit f66fe2c has been approved by |
bors
added a commit
that referenced
this pull request
Feb 24, 2018
Display git errors during authentication. Certain git errors during authentication were being converted to internal errors which meant that they are only seen if you pass `--verbose`. This may not be obvious, and many of these messages are helpful for diagnosing git errors. This change makes these errors always be displayed. Fixes #5035. Note: Some of the git errors are currently unhelpful. Once Cargo has updated git2-rs to include alexcrichton/git2-rs#298, these errors will improve. (@alexcrichton, I can make a PR to update Cargo for the changes in git2 if you'd like). I'm uncertain if this is a good solution, since the error messages in some cases are a little verbose (such as showing `class=...`). Here is a sample of what some of the messages look like: <details><summary>Error Message Examples</summary> <p> Example of the git message shown below the "attempted yadda yadda" message. Scenario | Message ---------|-------- No ssh-agent, multiple usernames | `error authenticating: ; class=Ssh (23)` | | †`error authenticating: no auth sock variable; class=Ssh (23)` No ssh-agent, one username | `an unknown git error occurred` | | †`error authenticating: no auth sock variable; class=Ssh (23)` Incorrect ssh-agent setup | `error authenticating: failed connecting with agent; class=Ssh (23)` ssh-agent no keys, one username | `an unknown git error occurred` | | †`failed to acquire username/password from local configuration` ssh-agent no keys, multiple usernames | `error authenticating: ; class=Ssh (23)` | | †`no authentication available` auth success, bad path | `fatal: '/path/to/repo/' does not appear to be a git repository; class=Ssh (23); code=Eof (-20)` | | ‡`ERROR: Repository not found.; class=Ssh (23); code=Eof (-20)` bad username | `an unknown git error occurred` | | †`failed to acquire username/password from local configuration` | | ‡`error authenticating: Username/PublicKey combination invalid; class=Ssh (23)` † - Messages once git2-rs is updated. ‡ - Github message </p> </details>
☀️ Test successful - status-appveyor, status-travis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Certain git errors during authentication were being converted to internal errors which meant that they are only seen if you pass
--verbose
. This may not be obvious, and many of these messages are helpful for diagnosing git errors. This change makes these errors always be displayed.Fixes #5035.
Note: Some of the git errors are currently unhelpful. Once Cargo has updated git2-rs to include alexcrichton/git2-rs#298, these errors will improve. (@alexcrichton, I can make a PR to update Cargo for the changes in git2 if you'd like).
I'm uncertain if this is a good solution, since the error messages in some cases are a little verbose (such as showing
class=...
). Here is a sample of what some of the messages look like:Error Message Examples
Example of the git message shown below the "attempted yadda yadda" message.
error authenticating: ; class=Ssh (23)
error authenticating: no auth sock variable; class=Ssh (23)
an unknown git error occurred
error authenticating: no auth sock variable; class=Ssh (23)
error authenticating: failed connecting with agent; class=Ssh (23)
an unknown git error occurred
failed to acquire username/password from local configuration
error authenticating: ; class=Ssh (23)
no authentication available
fatal: '/path/to/repo/' does not appear to be a git repository; class=Ssh (23); code=Eof (-20)
ERROR: Repository not found.; class=Ssh (23); code=Eof (-20)
an unknown git error occurred
failed to acquire username/password from local configuration
error authenticating: Username/PublicKey combination invalid; class=Ssh (23)
† - Messages once git2-rs is updated.
‡ - Github message