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 — fix git repo public check for azure devops by marcosnils · Pull Request #13516 · dagger/dagger Conversation
Contributor
Looks like azure devops changed the way they handle unauthenticated git requests, which causes go-git to return an error different to ErrInvalidPktLen. This commit adds handling for the new response and error and treat it as an auth-required/private repository.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
grouville
self-requested a review
grouville
approved these changes
| ||||||||||||||||||||
| @@ -836,14 +836,20 @@ func IsRemotePublic(ctx context.Context, remote *gitutil.GitURL) (bool, error) { | |||
| }) | |||
| _, err := repo.ListContext(ctx, &git.ListOptions{Auth: nil}) | |||
| if err != nil { | |||
| // Some Git hosts (Azure Repos and custom portals) return a 200 HTML login page for unauthenticated refs: go-git reports ErrInvalidPktLen | |||
| fmt.Printf("Message: %v | Type: %T\n", err, err) | |||
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Do we want to keep the fmt.Printf() ?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Corresponding upstream issue created go-git/go-git#2200 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Looks like azure devops changed the way they handle unauthenticated git requests, which causes go-git to return an error different to ErrInvalidPktLen. This commit adds handling for the new response and error and treat it as an auth-required/private repository. Signed-off-by: Marcos Nils <[email protected]>
1686ac6 to
fafacf6
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.