forked from TrueCloudLab/distribution
Merge pull request #699 from dotcloud/docker_login-fix
fix docker login when same username
This commit is contained in:
commit
aa1796915d
1 changed files with 6 additions and 1 deletions
|
@ -428,9 +428,14 @@ func (r *Registry) ResetClient(authConfig *auth.AuthConfig) {
|
||||||
r.client.Jar = cookiejar.NewCookieJar()
|
r.client.Jar = cookiejar.NewCookieJar()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Registry) GetAuthConfig() *auth.AuthConfig {
|
func (r *Registry) GetAuthConfig(withPasswd bool) *auth.AuthConfig {
|
||||||
|
password := ""
|
||||||
|
if withPasswd {
|
||||||
|
password = r.authConfig.Password
|
||||||
|
}
|
||||||
return &auth.AuthConfig{
|
return &auth.AuthConfig{
|
||||||
Username: r.authConfig.Username,
|
Username: r.authConfig.Username,
|
||||||
|
Password: password,
|
||||||
Email: r.authConfig.Email,
|
Email: r.authConfig.Email,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue