last version.
* When proxying an upload to a special remote, verify the hash.
* Avoid loading cluster log at startup.
+ * When getting from a P2P HTTP remote, prompt for credentials when
+ required, instead of failing.
-- Joey Hess <id@joeyh.name> Wed, 31 Jul 2024 15:52:03 -0400
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds, TypeApplications #-}
+{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE CPP #-}
module P2P.Http.Client (
versions = filter allowedversion allProtocolVersions
go clientenv mcred credcached mauth (v:vs) = do
myuuid <- getUUID
- res <- clientaction clientenv v
+ res <- catchclienterror $ clientaction clientenv v
(B64UUID (uuid rmt))
(B64UUID myuuid)
[]
("git-annex HTTP API server returned an unexpected response: " ++ show clienterror)
go _ _ _ _ [] = return Nothing
+ catchclienterror a = a `catch` \(ex :: ClientError) -> pure (Left ex)
+
authrequired clientenv vs = do
cred <- prompt $
inRepo $ Git.getUrlCredential credentialbaseurl
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
I am currently experimenting with supporting the p2phttp protocol in forgejo-aneksajo. So far I have a prototype working with public repositories and it was surprisingly straightforward, but private repositories do not work yet due to this bug.
+
+> [[fixed|done]] --[[Joey]]