How do I specify LFS credentials when different from Git repo credentials?
We have a private repo on GitHub using LFS, with the LFS objects stored in a private Artifactory repo on jfrog.io. The closest I have come to getting it to work as a vcs root in TeamCity is by specifying agent side checkout, and using a https URL for the git repo on GitHub, specifying a personal API token for the password on GitHub. That fails when it can't authenticate to the Artifactory repo. Where I'm stuck is how to get the checkout to know about and make use of authentication of the LFS Artifactory repo. If I have to I can make the accounts on GitHub and the Artifactory repo have the same user name, but not the same api key (password).
Am I missing something about how to configure this?
Please sign in to leave a comment.
I tried using git config --global credential.helper store and putting the credentials in ~/.git-credentials, verifying that it works running git from the command line. But I see in the build log that TeamCity calls git with -c credential.helper= to clear all credential settings before setting just the configured name and password for the vcs root.
If I edit .lfsconfig to include name and password fields in the URL (https://USER:APIKEY@myartifactory.example.com/etc) then it works. But it does not seem right to commit our artifactory access credentials in a plain text file in the git repository. Any alternative?
Hi Sidney,
at the moment TeamCity doesn't support dedicated authentication settings for LFS and always uses the credentials specified in the VCS root settings. As a workaround please try using an uploaded SSH key in VCS root (https://confluence.jetbrains.com/display/TCD10/SSH+Upload) and register the same key in Artifactory (https://www.jfrog.com/confluence/display/RTF/Git+LFS+Repositories#GitLFSRepositories-AuthenticatingwithSSH).