-
Notifications
You must be signed in to change notification settings - Fork 511
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
Fix auth login error messages and messaging when witnessing a delegation with 0 valid keys #972
Changes from all commits
e393de5
25cd29c
84bb4ae
7772deb
220cfb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.4 | ||
0.4.1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ import ( | |
"strings" | ||
"time" | ||
|
||
"golang.org/x/crypto/ssh/terminal" | ||
|
||
"github.com/Sirupsen/logrus" | ||
"github.com/docker/distribution/registry/client/auth" | ||
"github.com/docker/distribution/registry/client/transport" | ||
|
@@ -755,7 +757,8 @@ type passwordStore struct { | |
} | ||
|
||
func (ps passwordStore) Basic(u *url.URL) (string, string) { | ||
if ps.anonymous { | ||
// if it's not a terminal, don't wait on input | ||
if ps.anonymous || !terminal.IsTerminal(int(os.Stdin.Fd())) { | ||
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. Shouldn't we be checking the input that was set on the command? 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. IRL: leave as is for now as we use |
||
return "", "" | ||
} | ||
|
||
|
@@ -795,6 +798,15 @@ func (ps passwordStore) Basic(u *url.URL) (string, string) { | |
return username, password | ||
} | ||
|
||
// to comply with the CredentialStore interface | ||
func (ps passwordStore) RefreshToken(u *url.URL, service string) string { | ||
return "" | ||
} | ||
|
||
// to comply with the CredentialStore interface | ||
func (ps passwordStore) SetRefreshToken(u *url.URL, service string, token string) { | ||
} | ||
|
||
type httpAccess int | ||
|
||
const ( | ||
|
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
awesome, thanks for adding this test 👍