History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-3389
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Steve Luo
Reporter: Mike Cordeiro
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

GitHub Checkout Fails Attempting to set Status when using Person Access tokens

Created: 07/May/19 09:00 PM   Updated: Yesterday 03:14 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment:
Windows
SQL Server


 Description  « Hide
On a private GitHub repo, getting 404 attempting to set status on Checkout step (building pull requests) when using username and Person Access Token. MFA is required on our private repo, so traditional username/password is not an option. It does appear the the PR is located fine, so access token is correct (also have had success checking out with personal access token in URL using basic auth, but hasn't worked on pull requests).

Error below.


15:22:30,939 INFO - Checking step execute condition...
15:22:30,939 INFO - Step execute condition satisfied, executing...
15:22:31,059 INFO - Executing pre-execute action...
15:22:31,059 INFO - Running step...
15:22:31,059 INFO - Checking out revision '13660a56121ceb515260477bd9558a7b2b2bd986' of repository 'GitHub Repository'...
15:22:31,388 WARN - Base build not exist to calculate change sets.
15:22:31,449 INFO - Executing post-execute action...
15:22:31,449 ERROR - Step 'master>Checkout Source>Git Checkout' is failed.
    java.lang.RuntimeException: org.eclipse.egit.github.core.client.RequestException: Not Found (404)
        at com.google.common.base.Throwables.propagate(Throwables.java:160)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository.onBuildStart(GitHubRepository.java:76)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository.checkoutByRevision(GitHubRepository.java:66)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$959cf1f.CGLIB$checkoutByRevision$4(<generated>)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$959cf1f$$FastClassByCGLIB$$c9ce3472.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$959cf1f.checkoutByRevision(<generated>)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository.checkoutByRevision(GitHubRepository.java:49)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$959cf1f.CGLIB$checkoutByRevision$3(<generated>)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$959cf1f$$FastClassByCGLIB$$c9ce3472.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$959cf1f.checkoutByRevision(<generated>)
        at com.pmease.quickbuild.repositorysupport.Repository.checkout(Repository.java:228)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$959cf1f.CGLIB$checkout$115(<generated>)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$959cf1f$$FastClassByCGLIB$$c9ce3472.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository$$EnhancerByCGLIB$$959cf1f.checkout(<generated>)
        at com.pmease.quickbuild.repositorysupport.CheckoutStep.run(CheckoutStep.java:71)
        at com.pmease.quickbuild.repositorysupport.CheckoutStep$$EnhancerByCGLIB$$8050c844.CGLIB$run$0(<generated>)
        at com.pmease.quickbuild.repositorysupport.CheckoutStep$$EnhancerByCGLIB$$8050c844$$FastClassByCGLIB$$9e102dbc.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.repositorysupport.CheckoutStep$$EnhancerByCGLIB$$8050c844.run(<generated>)
        at com.pmease.quickbuild.stepsupport.Step.doExecute(Step.java:664)
        at com.pmease.quickbuild.stepsupport.Step.execute(Step.java:570)
        at com.pmease.quickbuild.stepsupport.StepExecutionJob.executeStepAwareJob(StepExecutionJob.java:31)
        at com.pmease.quickbuild.stepsupport.StepAwareJob.executeBuildAwareJob(StepAwareJob.java:56)
        at com.pmease.quickbuild.BuildAwareJob.execute(BuildAwareJob.java:77)
        at com.pmease.quickbuild.grid.GridJob.run(GridJob.java:129)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: org.eclipse.egit.github.core.client.RequestException: Not Found (404)
        at org.eclipse.egit.github.core.client.GitHubClient.createException(GitHubClient.java:583)
        at org.eclipse.egit.github.core.client.GitHubClient.sendJson(GitHubClient.java:674)
        at org.eclipse.egit.github.core.client.GitHubClient.post(GitHubClient.java:788)
        at org.eclipse.egit.github.core.service.CommitService.createStatus(CommitService.java:428)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository.updateCommitStatus(GitHubRepository.java:203)
        at com.pmease.quickbuild.plugin.scm.github.GitHubRepository.onBuildStart(GitHubRepository.java:73)
        ... 35 more

 All   Comments   Work Log   Change History      Sort Order:
Steve Luo [12/May/19 03:24 PM]
Hi,

There is no access token available for GitHub repository, instead, it is for GitLab. So please make sure you are using the correct repository type. Also, username and password is required for accessing GitHub repository.

Mike Cordeiro [13/May/19 11:58 AM]
Is there any plan to support OAuth tokens on a github repository in the future (https://help.github.com/en/articles/git-automation-with-oauth-tokens)? Because our company requires us to have MFA enabled for all accounts, we cannot use a traditional username/password.

Thanks

Mike Cordeiro [13/May/19 03:11 PM]
After looking into this further on our end, it appears that using the token in the password field instead of the password resolved this issue. Thanks