[JIRA] (JENKINS-50321) Git LFS fails for pull requests merged with the target branch with the GitHub Branch Source Plugin

529 views
Skip to first unread message

david.parsson@gmail.com (JIRA)

unread,
Mar 21, 2018, 11:51:02 AM3/21/18
to jenkinsc...@googlegroups.com
David Pärsson created an issue
 
Jenkins / Bug JENKINS-50321
Git LFS fails for pull requests merged with the target branch with the GitHub Branch Source Plugin
Issue Type: Bug Bug
Assignee: Mark Waite
Attachments: 20180321T164155.656172294.log
Components: git-plugin, github-branch-source-plugin
Created: 2018-03-21 15:50
Environment: Jenkins 2.89.4
GitHub Branch Source Plugin 2.3.3 (latest)
Git plugin 3.8.0 (latest)
git 2.11.0
git-lfs 2.4.0
Priority: Major Major
Reporter: David Pärsson

In a job created by the GitHub Branch Source plugin, git lfs pull fails with Bad credentials when building pull requests merged with the target branch.

It works fine when building any branch separately. 

Here's the build log:

Started by user Anonymous
Connecting to https://api.github.com using github-user/****** (GitHub username and password for github-user)
Checking out git https://github.com/acme-inc/repo.git into /var/jenkins_home/jobs/some-job/branches/PR-512/workspace@script to read Jenkinsfile
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/acme-inc/repo.git # timeout=10
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree
> git reset --hard # timeout=10
> git clean -fdx # timeout=10
Fetching without tags
Fetching upstream changes from https://github.com/acme-inc/repo.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials GitHub username and password for github-user
> git fetch --no-tags --progress https://github.com/acme-inc/repo.git +refs/pull/512/head:refs/remotes/origin/PR-512 +refs/heads/master:refs/remotes/origin/master
Merging remotes/origin/master commit ac1ba744ee37a24027fb05a662b8ad79a675a19f into PR head commit f2ccaf9bd99cf9596c9b0bfc9ae9e92bd747eeaf
Enabling Git LFS pull
> git config core.sparsecheckout # timeout=10
> git checkout -f f2ccaf9bd99cf9596c9b0bfc9ae9e92bd747eeaf
> git config --get remote.origin.url # timeout=10
using GIT_ASKPASS to set credentials GitHub username and password for github-user
> git lfs pull origin
> git merge ac1ba744ee37a24027fb05a662b8ad79a675a19f # timeout=10
Enabling Git LFS pull
> git config core.sparsecheckout # timeout=10
> git checkout -f f2ccaf9bd99cf9596c9b0bfc9ae9e92bd747eeaf
> git config --get remote.origin.url # timeout=10
using GIT_ASKPASS to set credentials GitHub username and password for github-user
> git lfs pull origin

GitHub has been notified of this commit’s build result

hudson.plugins.git.GitException: Command "git merge ac1ba744ee37a24027fb05a662b8ad79a675a19f" returned status code 128:
stdout: 
stderr: Downloading path/to/some_file.zip (292 KB)
Error downloading object: path/to/some_file.zip (b7bf2ce): Smudge error: Error downloading path/to/some_file.zip (b7bf2ceb57d399cd89d339f2cddf5c355979b580861346d7e1251a60bc3fbfe9): batch response: Bad credentials

Errors logged to /var/jenkins_home/jobs/some-job/branches/PR-512/workspace@script/.git/lfs/logs/20180321T163523.475698065.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: path/to/some_file.zip: smudge filter lfs failed

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1996)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1964)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1960)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1597)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$3.execute(CliGitAPIImpl.java:697)
at jenkins.plugins.git.MergeWithGitSCMExtension.decorateRevisionToBuild(MergeWithGitSCMExtension.java:122)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1068)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1161)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:143)
at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:120)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:271)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE

I have tried git-lfs 2.2.1 as described in JENKINS-46921, and 2.4.0. The git-lfs log is attached.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

david.parsson@gmail.com (JIRA)

unread,
Mar 21, 2018, 11:55:02 AM3/21/18
to jenkinsc...@googlegroups.com
David Pärsson updated an issue
Change By: David Pärsson
In a job created by the GitHub Branch Source plugin, {{git lfs pull}} fails with {{Bad credentials}} when building pull requests merged with the target branch.

It works fine when building any branch separately. 

Here's the build log:
{code:java}
Finished: FAILURE{code}
I have tried git-lfs 2.2.1 as described in 
- JENKINS-46921 - , and 2.4.0. The git-lfs log is attached. The branch is built with a {{Jenkinsfile}} containing {{checkout scm}}. The repository is private.

david.parsson@gmail.com (JIRA)

unread,
Mar 21, 2018, 11:55:06 AM3/21/18
to jenkinsc...@googlegroups.com
I have tried git-lfs 2.2.1 as described in - - JENKINS-46921- - , and 2.4.0 . , with no luck The git-lfs log is attached. The branch is built with a {{Jenkinsfile}} containing {{checkout scm}}. The repository is private.

mark.earl.waite@gmail.com (JIRA)

unread,
Mar 21, 2018, 11:57:02 AM3/21/18
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Mar 21, 2018, 11:59:02 AM3/21/18
to jenkinsc...@googlegroups.com
Mark Waite resolved as Duplicate
 

Refer to JENKINS-45228 as the original description of this issue. The git plugin assumes that `git merge` does not require credentials. When LFS support was added to the git plugin, LFS credentials support was not added to the merge portion of the git plugin.

Change By: Mark Waite
Status: Open Resolved
Resolution: Duplicate

david.parsson@gmail.com (JIRA)

unread,
Mar 21, 2018, 12:04:03 PM3/21/18
to jenkinsc...@googlegroups.com

david.parsson@gmail.com (JIRA)

unread,
Mar 21, 2018, 12:05:02 PM3/21/18
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 22, 2019, 9:35:17 PM10/22/19
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Duplicate
Change By: Mark Waite
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages