You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When fetching LFS objects from an HTTP endpoint that doesn't match the same address as the SSH URL fails, git-lfs will report a failed fetch to https://SSH URL instead of https://LFS URL.
This is a common issue with Atlassian Bamboo. Bamboo uses an internal Apache MINA SSHD (SSH-PROXY) service to proxy the authentication to a repository. That SSH-PROXY runs on 127.0.0.1. Whenever an LFS fetch issue happens, the git logs will show a failed connection to https://127.0.0.1:xxxxx instead of the remote LFS URL.
To Reproduce
Create an LFS-enabled repository
Shutdown or block the HTTP server (we want it to fail to fetch)
Clone it using an SSH URL and force an IP address (so we will be specifying an "internal" SSH server that does not match the HTTP URL) git clone ssh://[email protected]:7999/big/bigfiles.git
Keep the HTTP server down and run git lfs fetch origin
Observe the error message
fetch: Fetching reference refs/heads/master
batch response: Post "https://bitbucket721.osalva.net/scm/big/bigfiles.git/info/lfs/objects/batch": dial tcp 10.0.9.7:443: connect: connection refused
error: failed to fetch some objects from 'https://10.0.9.7/big/bigfiles.git/info/lfs'
Expected behavior
Git should report the LFS URL reported by the server it is trying to fetch and not the remote (SSH) URL:
error: failed to fetch some objects from 'https://bitbucket721.osalva.net/big/bigfiles.git/info/lfs'
System environment
Tested on Bitbucket server, will probably occur on other Git repositories as well
I agree this is probably not working the way it should, and we can look into fixing it. However, it's not trivial because the API client which is being used for fetching is deep inside another structure and this message is printed at a higher level. Therefore, it's likely this will be fixed only if someone sends a patch.
Describe the bug
When fetching LFS objects from an HTTP endpoint that doesn't match the same address as the SSH URL fails, git-lfs will report a failed fetch to https://SSH URL instead of https://LFS URL.
This is a common issue with Atlassian Bamboo. Bamboo uses an internal Apache MINA SSHD (SSH-PROXY) service to proxy the authentication to a repository. That SSH-PROXY runs on 127.0.0.1. Whenever an LFS fetch issue happens, the git logs will show a failed connection to https://127.0.0.1:xxxxx instead of the remote LFS URL.
To Reproduce
Create an LFS-enabled repository
Shutdown or block the HTTP server (we want it to fail to fetch)
Clone it using an SSH URL and force an IP address (so we will be specifying an "internal" SSH server that does not match the HTTP URL)
git clone ssh://[email protected]:7999/big/bigfiles.git
Keep the HTTP server down and run
git lfs fetch origin
Observe the error message
Expected behavior
Git should report the LFS URL reported by the server it is trying to fetch and not the remote (SSH) URL:
System environment
Output of
git lfs env
Additional context
There's been some work here #3469 and here #3470 that can be extended
The text was updated successfully, but these errors were encountered: