Jenkins Git Plugin with Git LFS does not work with "Bad Credentials" on a slave Mac

At my company, we built the Jenkins CI system against our internal copy of GitHub Enterprise using Jenkins Git Plugin (2.4.2) and Git LFS (1.1.2). Despite having valid credentials stored in Jenkins, as well as stored on a Mac slave using globally configured credentials, the storage check always ends with this failure:

Caused by: hudson.plugins.git.GitException: Command "git checkout -f ___my_commit_hash___ returned status code 128:
stdout:
stderr: Downloading ___my_lfs_file___ (754 B)
Error accessing media: ___my_lfs_file___ (___my_lfs_file_hash___)

Errors logged to .git\lfs\objects\logs\___my_lfs_log___.log
Use `git lfs logs last` to view the log.
error: external filter git-lfs smudge %f failed 2
error: external filter git-lfs smudge %f failed
fatal: ___my_lfs_file___: smudge filter lfs failed

And the Git log shows:

Git credentials for https://git.mycompany.com/myrepository.git not found.

or

Bad Credentials

, ; Jenkins. , , Mac, Windows Git LFS. Git LFS Git LFS Mac?

+4
2

Mac .

-, Unix SSH. java- Jenkins slave.jar. , , , , , - . , /etc/paths ( Homebrew git -lfs) - bash. Jenkins , Java Web Start ( Windows), , ( ).

Git LFS Homebrew, /etc/paths, /usr/local/bin. .profile, . /usr/local/bin ( git -lfs Jenkins), ~/.bashrc .

Git LFS, ~/.gitconfig( git config --global) :

[filter "lfs"]
    clean = git-lfs clean %f
    smudge = git-lfs smudge %f
    required = true

, Git LFS , .

Git ( . ).

[credential]
    helper = "osxkeychain "

Git init + fetch, (. JENKINS-30318 ). ( ). Git ( init + fetch) , . ( - ). , Git checkout . , git -lfs -, , Jenkins. Git LFS API , Git LFS gitcredentials (GitHub). Windows . Mac, Jenkins , Git LFS . Keychain "" "" (. comment) (. ), , , Git LFS.

+5

Jenkins Git , 3.1.0 :

Git (LFS) (JENKINS-30318, JENKINS-35687, JENKINS-38708, JENKINS-40174)

"Git LFS Pull After Checkout"

0

All Articles