plumb creds from webapp to initremote
Avoids abusing setting environment variables, which was always a hack and won't work on windows.
This commit is contained in:
parent
b2fae4b78f
commit
fa24ba2520
24 changed files with 96 additions and 92 deletions
|
@ -21,6 +21,7 @@ import Common.Annex
|
|||
import Types.Remote
|
||||
import Types.GitConfig
|
||||
import Types.Crypto
|
||||
import Types.Creds
|
||||
import qualified Git
|
||||
import qualified Git.Command
|
||||
import qualified Git.Config
|
||||
|
@ -149,8 +150,8 @@ noCrypto = error "cannot use gcrypt remote without encryption enabled"
|
|||
unsupportedUrl :: Annex a
|
||||
unsupportedUrl = error "using non-ssh remote repo url with gcrypt is not supported"
|
||||
|
||||
gCryptSetup :: Maybe UUID -> RemoteConfig -> Annex (RemoteConfig, UUID)
|
||||
gCryptSetup mu c = go $ M.lookup "gitrepo" c
|
||||
gCryptSetup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)
|
||||
gCryptSetup mu _ c = go $ M.lookup "gitrepo" c
|
||||
where
|
||||
remotename = fromJust (M.lookup "name" c)
|
||||
go Nothing = error "Specify gitrepo="
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue