diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-11 14:06:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-11 14:07:56 -0400 |
commit | 066a06606aeb7f4a3cd70e7b592fef8dc6a9b71e (patch) | |
tree | 98458711a7dab3e3c669b513ed7b84cc2502374b /Remote/GCrypt.hs | |
parent | f779747a0d4d5c9e39a3c82498fe1809d56b4d25 (diff) |
plumb creds from webapp to initremote
Avoids abusing setting environment variables, which was always a hack
and won't work on windows.
Diffstat (limited to 'Remote/GCrypt.hs')
-rw-r--r-- | Remote/GCrypt.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Remote/GCrypt.hs b/Remote/GCrypt.hs index 03747314c..ed8fbf480 100644 --- a/Remote/GCrypt.hs +++ b/Remote/GCrypt.hs @@ -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=" |