Jenkins Git Plugin with Git LFS fails with 'Bad Credentials' on Mac slave

Viewed 5571

At my company we have been setting up a Jenkins CI system against our internal GitHub Enterprise instance using the Jenkins Git Plugin (2.4.2) and Git LFS (1.1.2). Despite having valid credentials stored in Jenkins and also stored on the Mac slave using the globally configured credentials, checking out the repository 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

When I log onto the slave and directly run the commands, everything works; only the Jenkins slave process triggers the errors. This also only seems to affect our Mac slave, the Windows slave uses the stored credentials and properly runs Git LFS. How can I configure the Git Plugin to properly run Git LFS on a Mac slave?

2 Answers
Related