mirror of https://github.com/perkeep/perkeep.git
pkg/client: don't use config file auth when using an explicit server
Change-Id: I07e3080adf4fed13deb3ec5a2ee900f4fc3a77fe
This commit is contained in:
parent
edd5cff32a
commit
3d748363f7
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue