avoid getting creds from environment during autoenable
When autoenabling special remotes of type S3, weddav, or glacier, do not take login credentials from environment variables, as the user may not be expecting the autoenable to happen, and may have those set for other purposes.
This commit is contained in:
parent
02e74c010b
commit
0e44c252c8
14 changed files with 72 additions and 37 deletions
|
@ -128,7 +128,7 @@ gen r u rc gc rs = do
|
|||
chunkconfig = getChunkConfig c
|
||||
|
||||
webdavSetup :: SetupStage -> Maybe UUID -> Maybe CredPair -> RemoteConfig -> RemoteGitConfig -> Annex (RemoteConfig, UUID)
|
||||
webdavSetup _ mu mcreds c gc = do
|
||||
webdavSetup ss mu mcreds c gc = do
|
||||
u <- maybe (liftIO genUUID) return mu
|
||||
url <- maybe (giveup "Specify url=")
|
||||
(return . fromProposedAccepted)
|
||||
|
@ -138,7 +138,7 @@ webdavSetup _ mu mcreds c gc = do
|
|||
creds <- maybe (getCreds pc gc u) (return . Just) mcreds
|
||||
testDav url creds
|
||||
gitConfigSpecialRemote u c' [("webdav", "true")]
|
||||
c'' <- setRemoteCredPair encsetup pc gc (davCreds u) creds
|
||||
c'' <- setRemoteCredPair ss encsetup pc gc (davCreds u) creds
|
||||
return (c'', u)
|
||||
|
||||
store :: DavHandleVar -> ChunkConfig -> Storer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue