include creds location in info

This is intended to let the user easily tell if a remote's creds are
coming from info embedded in the repository, or instead from the
environment, or perhaps are locally stored in a creds file.

This commit was sponsored by Frédéric Schütz.
This commit is contained in:
Joey Hess 2014-10-21 15:09:40 -04:00
parent a0297915c1
commit 9280fe4cbe
3 changed files with 30 additions and 5 deletions

View file

@ -72,7 +72,8 @@ gen r u c gc = new <$> remoteCost gc expensiveRemoteCost
availability = GloballyAvailable,
remotetype = remote,
mkUnavailable = gen r u (M.insert "host" "!dne!" c) gc,
getInfo = return [("bucket", fromMaybe "unknown" (getBucket c))]
getInfo = includeCredsInfo c (AWS.creds u)
[ ("bucket", fromMaybe "unknown" (getBucket c)) ]
}
s3Setup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)