File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,17 @@ func (h Osxkeychain) Add(creds *credentials.Credentials) error {
46
46
item .SetLabel (credentials .CredsLabel )
47
47
item .SetAccount (creds .Username )
48
48
item .SetData ([]byte (creds .Secret ))
49
+ // Prior to v0.9, the credential helper was searching for credentials with
50
+ // the "dflt" authentication type (see [1]). Since v0.9.0, Get doesn't use
51
+ // that attribute anymore, and v0.9.0 - v0.9.2 were not setting it here
52
+ // either.
53
+ //
54
+ // In order to keep compatibility with older versions, we need to store
55
+ // credentials with this attribute set. This way, credentials stored with
56
+ // newer versions can be retrieved by older versions.
57
+ //
58
+ // [1]: https://github.com/docker/docker-credential-helpers/blob/v0.8.2/osxkeychain/osxkeychain.c#L66
59
+ item .SetAuthenticationType ("dflt" )
49
60
if err := splitServer (creds .ServerURL , item ); err != nil {
50
61
return err
51
62
}
You can’t perform that action at this time.
0 commit comments