a local git remote cannot proxy
Prevent listProxied from listing anything when the proxy remote's url is a local directory. Proxying does not work in that situation, because the proxied remotes have the same url, and so git-annex-shell is not run when accessing them, instead the proxy remote is accessed directly. I don't think there is any good way to support this. Even if the instantiated git repos for the proxied remotes somehow used an url that caused it to use git-annex-shell to access them, planned features like `git-annex copy --to proxy` accepting a key and sending it on to nodes behind the proxy would not work, since git-annex-shell is not used to access the proxy. So it would need to use something to access the proxy that causes git-annex-shell to be run and speaks P2P protocol over it. And we have that. It's a ssh connection to localhost. Of course, it would be possible to take ssh out of that mix, and swap in something that does not have encryption overhead and authentication complications, but otherwise behaves the same as ssh. And if the user wants to do that, GIT_SSH does exist.
This commit is contained in:
parent
c6e0710281
commit
f98605bce7
2 changed files with 4 additions and 7 deletions
|
@ -855,9 +855,12 @@ listProxied proxies rs = concat <$> mapM go rs
|
|||
Git.ConfigKey proxyconfigprefix = remoteConfig proxyname mempty
|
||||
|
||||
-- Git remotes that are gcrypt or git-lfs special remotes cannot
|
||||
-- proxy. Proxing is also not yet supported for remotes using P2P
|
||||
-- proxy. Local git remotes cannot proxy either because
|
||||
-- git-annex-shell is not used to access a local git url.
|
||||
-- Proxing is also yet supported for remotes using P2P
|
||||
-- addresses.
|
||||
canproxy gc r
|
||||
| remoteAnnexGitLFS gc = False
|
||||
| Git.GCrypt.isEncrypted r = False
|
||||
| Git.repoIsLocal r || Git.repoIsLocalUnknown r = False
|
||||
| otherwise = isNothing (repoP2PAddress r)
|
||||
|
|
|
@ -36,12 +36,6 @@ For June's work on [[design/passthrough_proxy]], implementation plan:
|
|||
|
||||
2. Remote instantiation for proxies. (done)
|
||||
|
||||
4. Prevent listProxied from listing anything when the proxy remote's
|
||||
url is a local directory. Proxying does not work in that situation,
|
||||
because the proxied remotes have the same url, and so git-annex-shell
|
||||
is not run when accessing them, instead the proxy remote is accessed
|
||||
directly.
|
||||
|
||||
3. Implement git-annex-shell proxying for CONNECT and NOTIFYCHANGES.
|
||||
(For completeness, they will only be used when using tor-annex
|
||||
to access a proxy.)
|
||||
|
|
Loading…
Add table
Reference in a new issue