diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-11-30 15:26:16 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-11-30 15:26:55 -0400 |
commit | deca4cd90ad599f859fc9efafe509ed7375c6f39 (patch) | |
tree | b0b9ea6af4bbc1228deb8f444fe23049728be97a /Remote | |
parent | f14c412232808399c609e0dd484b8243af7daa3a (diff) |
use P2P auth for git-remote-tor-annex
This changes the environment variable name to the more generic
GIT_ANNEX_P2P_AUTHTOKEN.
This commit was sponsored by andrea rota.
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Helper/Tor.hs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/Remote/Helper/Tor.hs b/Remote/Helper/Tor.hs index 25d192023..b5a819c3b 100644 --- a/Remote/Helper/Tor.hs +++ b/Remote/Helper/Tor.hs @@ -8,26 +8,8 @@ module Remote.Helper.Tor where import Annex.Common -import Utility.AuthToken -import Creds -import Utility.Tor -import Utility.Env import Network.Socket -import qualified Data.Text as T - --- Read the first line of the creds file. Environment variable overrides. -getTorAuthTokenFor :: OnionAddress -> Annex (Maybe AuthToken) -getTorAuthTokenFor (OnionAddress onionaddress) = - maybe Nothing mk <$> getM id - [ liftIO $ getEnv torAuthTokenEnv - , readCacheCreds onionaddress - ] - where - mk = toAuthToken . T.pack . takeWhile (/= '\n') - -torAuthTokenEnv :: String -torAuthTokenEnv = "GIT_ANNEX_TOR_AUTHTOKEN" torHandle :: Socket -> IO Handle torHandle s = do |