-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Affects Version/s: 7.12.6
-
Fix Version/s: 7.19.1
-
Component/s: None
-
Labels:None
-
Severity:Critical
-
Release Notes:Yes
Problem description:
In order to get GitLFS SSH working with Artifactory 7.x you must either have no custom-base-url configured or custom-base-url with /artifactory configured (incorrect for Artifactory 7.x).
The effect of having /artifactory in the custom-base-url is, when copying JFrog Url from Security settings via UI this will include /artifactory. This is incorrect when configuring other JFrog Services (Xray, Mission Control, etc..) system.yaml.
During the Git checkout, Git execute an SSH command like:
ssh -v example.com -p 1339 git-lfs-authenticate artifactory/<REPO NAME> download
If authenticated, the response contain a token and a link to the repository, like this:
{"header": {"Authorization":"Bearer ***"},"href":"https://example.com/api/lfs/api/lfs/example-dev-lfs-xxx"}
This URL is then used by GIT LFS to download files. This link is constructed according to the custom base url setting, which is missing the “artifactory” section in order to hit the correct endpoint.
What is the expected.
GitLFS SSH should be working with a custom-base-url that does not included /artifactory section, as expected in Artifactory 7.x.
Steps to reproduce.
- Setup Artifactory with GitLFS SSH.
- Create ssh keys one for the server and one for user within that server.
See following commands : ssh-keygen -m PEM -t rsa -C "admin@target.com", ssh-keygen -m PEM -t rsa -C "target.com"
- Input the user ssh key into his user profile within Artifactory.
- More on configuring GitLFS SSH can be found in the following two links: link one, link two.
- Create ssh keys one for the server and one for user within that server.
- Git push 3 times
- With no custom-base-url. (working)
- With custom-base-url that has /artifactory included (working)
- With custom-base-url that does not have /artifactory (not working)
Workaround:
In order to get GitLFS working you will need to have no custom-base-url or custom-base-url with /artifactory, as explained above.