handle git-credential prompt in -J mode
If git-credential has it cached and does not prompt, this will unfortunately result in a brief flicker, as the displayed console regions are hidden while running it and then re-displayed. Better than a corrupted display. Actually, I tried it and don't see a visible flicker, so probably only over a slow ssh will it be apparent.
This commit is contained in:
parent
1883f7ef8f
commit
6f90bb7738
4 changed files with 30 additions and 16 deletions
|
@ -133,12 +133,15 @@ withUrlOptionsPromptingCreds :: (U.UrlOptions -> Annex a) -> Annex a
|
|||
withUrlOptionsPromptingCreds a = do
|
||||
g <- Annex.gitRepo
|
||||
uo <- getUrlOptions
|
||||
prompter <- mkPrompter
|
||||
a $ uo
|
||||
{ U.getBasicAuth = getBasicAuthFromCredential g
|
||||
{ U.getBasicAuth = \u -> prompter $
|
||||
getBasicAuthFromCredential g u
|
||||
-- Can't download with curl and handle basic auth,
|
||||
-- so avoid using curl.
|
||||
-- so make sure it uses conduit.
|
||||
, U.urlDownloader = case U.urlDownloader uo of
|
||||
U.DownloadWithCurl _ -> U.DownloadWithConduit $ U.DownloadWithCurlRestricted mempty
|
||||
U.DownloadWithCurl _ -> U.DownloadWithConduit $
|
||||
U.DownloadWithCurlRestricted mempty
|
||||
v -> v
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue