GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — plumbing: transport/http, Expose typed auth error for Azure DevOps /_signin redirects by jfjrh2014 · Pull Request #2201 · go-git/go-git Conversation
Contributor
SummaryAzure DevOps redirects unauthenticated requests for private repositories from That made it impossible for callers to distinguish auth-required from a real transport failure without string-matching the error message. This change detects a redirect target ending with errors.Is(err, transport.ErrAuthenticationRequired) As noted by @pjbgf in #2200, we already have forge-specific logic for SSH failures, so adding an equivalent for the Azure DevOps HTTP redirect is consistent. Closes #2200 Changes
VerificationAdded test case in the existing
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…irects Azure DevOps redirects unauthenticated requests for private repos from /info/refs to /_signin. go-git surfaced this as a generic redirect error, making it impossible for callers to distinguish auth-required from a real transport failure without string-matching. When the redirect target ends with /_signin, wrap the error with transport.ErrAuthenticationRequired so callers can detect it via errors.Is(err, transport.ErrAuthenticationRequired). Closes go-git#2200 Signed-off-by: jeff <[email protected]>
pjbgf
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jfjrh2014 thanks for following up on this issue. 🙇
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Expose typed auth error for Azure DevOps/_signin redirects
Uh oh!
There was an error while loading. Please reload this page. 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. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |