Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-25065

GitLFS does not work with Artifactory 7.x base url.

    XMLWordPrintable

    Details

    • 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

      Description

      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.

      1. Setup Artifactory with GitLFS SSH.
        1. 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"
        2. Input the user ssh key into his user profile within Artifactory.
        3. More on configuring GitLFS SSH can be found in the following two links: link one, link two
      1. Git push 3 times
        1. With no custom-base-url. (working)
        2. With custom-base-url that has /artifactory included (working)
        3. 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.

        Attachments

          Activity

              People

              Assignee:
              nadavy Nadav Yogev
              Reporter:
              ohadl Ohad Levy
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-25065 -
                  SYNCHRONIZED
                  • Last Sync Date: