pkg/client: don't use config file auth when using an explicit server

Change-Id: I07e3080adf4fed13deb3ec5a2ee900f4fc3a77fe
This commit is contained in:
Brad Fitzpatrick 2013-01-02 11:42:39 -08:00
parent edd5cff32a
commit 3d748363f7
1 changed files with 7 additions and 0 deletions

View File

@ -90,6 +90,13 @@ func blobServerOrDie() string {
func (c *Client) SetupAuth() error {
configOnce.Do(parseConfig)
if flagServer != nil && *flagServer != "" {
// If using an explicit blobserver, don't use auth
// configured from the config file, so we don't send
// our password to a friend's blobserver.
c.authMode = auth.None{}
return nil
}
return c.SetupAuthFromConfig(config)
}