# Jenkins Checkout SCM Plugin can not authenticate to Github Enterprise Cloud wiht PAT token

**URL:** <https://community.jenkins.io/t/jenkins-checkout-scm-plugin-can-not-authenticate-to-github-enterprise-cloud-wiht-pat-token/25696>\
**Category:** Using Jenkins\
**Tags:** git\
**Created:** [January 13, 2025, 5:33pm UTC](https://community.jenkins.io/t/jenkins-checkout-scm-plugin-can-not-authenticate-to-github-enterprise-cloud-wiht-pat-token/25696 "2025-01-13T17:33:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![shane.ohanlon](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@shane.ohanlon](https://community.jenkins.io/u/shane.ohanlon)\
**Post date:** [January 13, 2025, 5:33pm UTC](https://community.jenkins.io/t/jenkins-checkout-scm-plugin-can-not-authenticate-to-github-enterprise-cloud-wiht-pat-token/25696/1 "2025-01-13T17:33:58Z")

</div>

See below for Jenkins Setup. We are using multi-branch pipelines that utilise a jenkins shared library. the jenkins shared library has the `checkout scm` command in it. We are currently migrating our github repositories from github (non -enterprise cloud - so normal githun) to Github Enterprise Cloud (this is hosted by github on [github.com](http://github.com), it is not a self hosted github enterprise server).

The checkout command works perfectly when using a username and Personal Access Token when pipelines are run against the repositories in our non enterprise github environment. However when we run the pipelines against the repos in our enterprise org on [github.com](http://github.com) it errors out. We have also duplicated the test by just creating a basic freestyle pipeline, that doesn’t use the shared library and uses the git checkout SCM plugin directly and have gotten the same error.

We have verified the token works fine by running the same clone and checkout operations directly on the jenkins agent and also on local desktops to verify that the token is valid. We are also able to use SSH as well however doing so will result in needing to upgrade the controller as our current server runs OS a version of ubuntu that doesn’t support opessh 7.6 whcih is required. We also would prefer not to ahve to get all pipelines to flip to ssh as well as making a lot of changes to our shared library. Any advice appreciated.

Details of the error on pipeline using shared library:

```auto
15:01:34 The recommended git tool is: NONE
15:01:34 using credential git-bveng-test-token
15:01:34 Cloning the remote Git repository
15:01:34 ERROR: Error cloning remote repo 'origin'
15:01:34 hudson.plugins.git.GitException: Command "git fetch --tags --progress -- git@github.com:bvengineering/curalate-bveng-curacmd-12-service.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
15:01:34 stdout: 
15:01:34 stderr: git@github.com: Permission denied (publickey).
15:01:34 fatal: Could not read from remote repository.
15:01:34  
15:01:34 Please make sure you have the correct access rights
15:01:34 and the repository exists.
15:01:34  
15:01:34 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2674)
15:01:34 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2098)
15:01:34 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:84)
15:01:34 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:618)
15:01:34 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:847)
15:01:34 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:158)
15:01:34 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:151)
15:01:34 at hudson.remoting.UserRequest.perform(UserRequest.java:211)
15:01:34 at hudson.remoting.UserRequest.perform(UserRequest.java:54)
15:01:34 at hudson.remoting.Request$2.run(Request.java:376)
15:01:34 at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
15:01:34 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
15:01:34 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
15:01:34 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
15:01:34 at java.base/java.lang.Thread.run(Thread.java:829)
15:01:34 Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to static-jenkins-agent-default-prod-java8-01
15:01:34 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
15:01:34 at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
15:01:34 at hudson.remoting.Channel.call(Channel.java:1000)
15:01:34 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:143)
15:01:34 at jdk.internal.reflect.GeneratedMethodAccessor347.invoke(Unknown Source)
15:01:34 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:01:34 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
15:01:34 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:129)
15:01:34 at com.sun.proxy.$Proxy98.execute(Unknown Source)
15:01:34 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1226)
15:01:34 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1308)
15:01:34 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
15:01:34 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
15:01:34 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
15:01:34 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
15:01:34 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
15:01:34 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
15:01:34 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
15:01:34 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
15:01:34 at java.base/java.lang.Thread.run(Thread.java:829)
[Pipeline] echo
15:01:34 Unable to initialize! : hudson.AbortException: Error cloning remote repo 'origin'

```

Details of the error on the basic pipeline:

```auto
Started by user Shane O'Hanlon
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on static-jenkins-agent-default-prod-java8-01 (default prod java8) in workspace /home/ubuntu/workspace/sohan-test-pipeline-git-pat
The recommended git tool is: NONE
using credential git-bveng-test-token
 > git rev-parse --resolve-git-dir /home/ubuntu/workspace/sohan-test-pipeline-git-pat/.git # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/bvengineering/curalate-bveng-curacmd-12-service.git # timeout=10
Fetching upstream changes from https://github.com/bvengineering/curalate-bveng-curacmd-12-service.git
 > git --version # timeout=10
 > git --version # 'git version 2.18.0'
using GIT_ASKPASS to set credentials git-bveng-test-token
 > git fetch --tags --progress -- https://github.com/bvengineering/curalate-bveng-curacmd-12-service.git +refs/heads/*:refs/remotes/origin/* # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.com/bvengineering/curalate-bveng-curacmd-12-service.git
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:1003)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1244)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1308)
	at hudson.scm.SCM.checkout(SCM.java:540)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1239)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:647)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:519)
	at hudson.model.Run.execute(Run.java:1899)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
	at hudson.model.ResourceController.execute(ResourceController.java:107)
	at hudson.model.Executor.run(Executor.java:449)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress -- https://github.com/bvengineering/curalate-bveng-curacmd-12-service.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: remote: Repository not found.
fatal: repository 'https://github.com/bvengineering/curalate-bveng-curacmd-12-service.git/' not found

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2674)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2098)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:84)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:618)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:158)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:151)
	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:376)
	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to static-jenkins-agent-default-prod-java8-01
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
		at hudson.remoting.Channel.call(Channel.java:1000)
		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:143)
		at jdk.internal.reflect.GeneratedMethodAccessor347.invoke(Unknown Source)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:129)
		at com.sun.proxy.$Proxy112.execute(Unknown Source)
		at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:1001)
		at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1244)
		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1308)
		at hudson.scm.SCM.checkout(SCM.java:540)
		at hudson.model.AbstractProject.checkout(AbstractProject.java:1239)
		at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:647)
		at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)
		at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:519)
		at hudson.model.Run.execute(Run.java:1899)
		at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
		at hudson.model.ResourceController.execute(ResourceController.java:107)
		at hudson.model.Executor.run(Executor.java:449)
ERROR: Error fetching remote repo 'origin'

```

## Jenkins setup: Jenkins: 2.362 OS: Linux - 4.4.0-148-generic Java: 11.0.14 - Ubuntu (OpenJDK 64-Bit Server VM)

ace-editor:1.1  
amazon-ecs:1.41  
analysis-model-api:10.15.0  
ansicolor:1.0.2  
ant:475.vf34069fef73c  
antisamy-markup-formatter:2.7  
apache-httpcomponents-client-4-api:4.5.13-138.v4e7d9a\_7b\_a\_e61  
authentication-tokens:1.4  
aws-credentials:191.vcb\_f183ce58b\_9  
aws-java-sdk:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-java-sdk-cloudformation:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-java-sdk-codebuild:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-java-sdk-ec2:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-java-sdk-ecr:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-java-sdk-ecs:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-java-sdk-elasticbeanstalk:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-java-sdk-iam:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-java-sdk-logs:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-java-sdk-minimal:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-java-sdk-sns:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-java-sdk-sqs:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-java-sdk-ssm:1.12.246-349.v96b\_b\_f7eb\_a\_c3c  
aws-lambda:0.5.10  
badge:1.9.1  
blueocean:1.25.5  
blueocean-autofavorite:1.2.5  
blueocean-bitbucket-pipeline:1.25.5  
blueocean-commons:1.25.5  
blueocean-config:1.25.5  
blueocean-core-js:1.25.5  
blueocean-dashboard:1.25.5  
blueocean-display-url:2.4.1  
blueocean-events:1.25.5  
blueocean-git-pipeline:1.25.5  
blueocean-github-pipeline:1.25.5  
blueocean-i18n:1.25.5  
blueocean-jira:1.25.5  
blueocean-jwt:1.25.5  
blueocean-personalization:1.25.5  
blueocean-pipeline-api-impl:1.25.5  
blueocean-pipeline-editor:1.25.5  
blueocean-pipeline-scm-api:1.25.5  
blueocean-rest:1.25.5  
blueocean-rest-impl:1.25.5  
blueocean-web:1.25.5  
bootstrap4-api:4.6.0-5  
bootstrap5-api:5.1.3-7  
bouncycastle-api:2.26  
branch-api:2.1046.v0ca\_37783ecc5  
build-name-setter:2.2.0  
build-timeout:1.21  
caffeine-api:2.9.3-65.v6a\_47d0f4d1fe  
checks-api:1.7.4  
cloudbees-bitbucket-branch-source:784.v7fcdc7c670f6  
cloudbees-folder:6.758.vfd75d09eea\_a\_1  
cobertura:1.17  
code-coverage-api:3.0.4  
command-launcher:84.v4a\_97f2027398  
conditional-buildstep:1.4.2  
config-file-provider:3.11.1  
credentials:1139.veb\_9579fca\_33b\_  
credentials-binding:523.vd859a\_4b\_122e6  
dark-theme:185.v276b\_5a\_8966a\_e  
dashboard-view:2.447.vda\_124dd35f11  
data-tables-api:1.12.1-2  
datadog:4.0.0  
depgraph-view:1.0.5  
display-url-api:2.3.6  
docker-commons:1.19  
docker-workflow:1.29  
dtkit-api:3.0.1  
durable-task:496.va67c6f9eefa7  
ec2:1.67  
ec2-fleet:2.5.1  
echarts-api:5.3.3-1  
email-ext:2.91  
envinject:2.875.v9b\_9e962da\_a\_ec  
envinject-api:1.199.v3ce31253ed13  
extended-choice-parameter:346.vd87693c5a\_86c  
extensible-choice-parameter:1.8.0  
external-monitor-job:192.ve979ca\_8b\_3ccd  
favorite:2.4.1  
font-awesome-api:6.1.1-1  
forensics-api:1.15.1  
ghprb:1.42.2  
git:4.11.4  
git-client:3.11.1  
git-parameter:0.9.17  
git-server:99.va\_0826a\_b\_cdfa\_d  
github:1.34.5  
github-api:1.303-400.v35c2d8258028  
github-branch-source:1677.v731f745ea\_0cf  
github-pr-coverage-status:2.1.1  
golang:1.4  
groovy:442.v817e6d937d6c  
groovy-postbuild:2.5  
handlebars:3.0.8  
handy-uri-templates-2-api:2.1.8-22.v77d5b\_75e6953  
htmlpublisher:1.30  
instance-identity:116.vf8f487400980  
jackson2-api:2.13.3-285.vc03c0256d517  
jakarta-activation-api:2.0.1-1  
jakarta-mail-api:2.0.0-6  
javadoc:217.v905b\_86277a\_2a\_  
javax-activation-api:1.2.0-4  
javax-mail-api:1.6.2-7  
jaxb:2.3.6-1  
jdk-tool:55.v1b\_32b\_6ca\_f9ca  
jenkins-asgard:2.0  
jenkins-design-language:1.25.5  
jira:3.7.1  
jjwt-api:0.11.5-77.v646c772fddb\_0  
jnr-posix-api:3.1.15-1  
job-dsl:1.79  
job-import-plugin:3.5  
jobConfigHistory:1163.ve82c7c6e60a\_3  
jquery:1.12.4-1  
jquery-detached:1.2.1  
jquery3-api:3.6.0-4  
jsch:0.1.55.61.va\_e9ee26616e7  
junit:1119.1121.vc43d0fc45561  
ldap:2.11  
lockable-resources:2.16  
mailer:438.v02c7f0a\_12fa\_4  
mapdb-api:1.0.9-28.vf251ce40855d  
matrix-auth:3.1.5  
matrix-project:785.v06b\_7f47b\_c631  
maven-plugin:3.19  
mercurial:2.16.2  
metrics:4.2.10-389.v93143621b\_050  
mina-sshd-api-common:2.8.0-36.v8e25ce90d4b\_1  
mina-sshd-api-core:2.8.0-36.v8e25ce90d4b\_1  
momentjs:1.1.1  
naginator:1.18.1  
next-build-number:1.8  
node-iterator-api:1.5.1  
nodejs:1.5.1  
nvm-wrapper:0.1.7  
okhttp-api:4.9.3-108.v0feda04578cf  
pam-auth:1.8  
parameterized-trigger:2.45  
pipeline-aws:1.43  
pipeline-build-step:2.18  
pipeline-github-lib:38.v445716ea\_edda\_  
pipeline-graph-analysis:195.v5812d95a\_a\_2f9  
pipeline-groovy-lib:612.v84da\_9c54906d  
pipeline-input-step:449.v77f0e8b\_845c4  
pipeline-milestone-step:101.vd572fef9d926  
pipeline-model-api:2.2114.v2654ca\_721309  
pipeline-model-definition:2.2114.v2654ca\_721309  
pipeline-model-extensions:2.2114.v2654ca\_721309  
pipeline-rest-api:2.24  
pipeline-stage-step:293.v200037eefcd5  
pipeline-stage-tags-metadata:2.2114.v2654ca\_721309  
pipeline-stage-view:2.24  
pipeline-utility-steps:2.13.0  
plain-credentials:139.ved2b\_9cf7587b  
plugin-usage-plugin:3.0  
plugin-util-api:2.17.0  
popper-api:1.16.1-3  
popper2-api:2.11.5-2  
prism-api:1.28.0-2  
promoted-builds:3.11  
pubsub-light:1.16  
python:1.3  
rebuild:1.34  
resource-disposer:0.19  
run-condition:1.5  
saml:2.333.vc81e525974a\_c  
scm-api:620.v0a\_5b\_1f8054c0  
script-security:1175.v4b\_d517d6db\_f0  
slack:616.v03b\_1e98d13dd  
snakeyaml-api:1.30.2-76.vc104f7ce9870  
sonar:2.14  
sse-gateway:1.25  
ssh-agent:1.24.1  
ssh-credentials:295.vced876c18eb\_4  
ssh-slaves:1.834.v622da\_57f702c  
sshd:3.249.v2dc2ea\_416e33  
structs:324.va\_f5d6774f3a\_d  
subversion:2.16.0  
theme-manager:1.5  
thinBackup:1.10  
throttle-concurrents:2.8  
timestamper:1.18  
token-macro:308.v4f2b\_ed62b\_b\_16  
translation:1.16  
trilead-api:1.71.v9e7860a\_67a\_df  
variant:59.vf075fe829ccb  
warnings-ng:9.15.0  
windows-slaves:1.8.1  
workflow-aggregator:590.v6a\_d052e5a\_a\_b\_5  
workflow-api:1188.v0016b\_4f29881  
workflow-basic-steps:986.v6b\_9c830a\_6b\_37  
workflow-cps:2759.v87459c4eea\_ca\_  
workflow-durable-task-step:1199.v02b\_9244f8064  
workflow-job:1232.v5a\_4c994312f1  
workflow-multibranch:716.vc692a\_e52371b\_  
workflow-scm-step:400.v6b\_89a\_1317c9a\_  
workflow-step-api:639.v6eca\_cd8c04a\_a\_  
workflow-support:838.va\_3a\_087b\_4055b  
ws-cleanup:0.42  
xunit:3.1.0  
xvfb:1.2

---

<div class="post-metadata">

**Author:** ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)\
**Post date:** [January 13, 2025, 6:36pm UTC](https://community.jenkins.io/t/jenkins-checkout-scm-plugin-can-not-authenticate-to-github-enterprise-cloud-wiht-pat-token/25696/2 "2025-01-13T18:36:02Z")

</div>

Jenkins version `2.362`  
That is over 2 years old and also your plugins are quite old then.  
Even when this turns out to be a bug anywhere this would only be fixed in the latest version of the faulty plugin which will most likely require that you update your Jenkins instance to a recent version.

---

<div class="post-metadata">

**Author:** ![shane.ohanlon](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@shane.ohanlon](https://community.jenkins.io/u/shane.ohanlon)\
**Post date:** [January 13, 2025, 6:49pm UTC](https://community.jenkins.io/t/jenkins-checkout-scm-plugin-can-not-authenticate-to-github-enterprise-cloud-wiht-pat-token/25696/3 "2025-01-13T18:49:20Z")

</div>

Thanks for the feedback. I understand that however the origin for scam we are running is from 2024. The plugin also works for non enterprise [GitHub.com](http://GitHub.com). So it does seem specific to the plugin. Outside of doing an upgrade which isn’t feasible right now, any other thoughts?

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [January 13, 2025, 7:10pm UTC](https://community.jenkins.io/t/jenkins-checkout-scm-plugin-can-not-authenticate-to-github-enterprise-cloud-wiht-pat-token/25696/4 "2025-01-13T19:10:29Z")

</div>

> [@shane.ohanlon](#):
>
> Outside of doing an upgrade which isn’t feasible right now, any other thoughts?

I think that you could create a separate, disposable installation that uses the current Jenkins version and current plugin versions and check that the problem is resolved in the most recent version. If the problem is resolved in the most recent revision, then you have another reason to upgrade. If the problem is not resolved in the most recent revision, you have enough information to submit a bug report.

---

<div class="post-metadata">

**Author:** ![shane.ohanlon](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@shane.ohanlon](https://community.jenkins.io/u/shane.ohanlon)\
**Post date:** [January 13, 2025, 8:06pm UTC](https://community.jenkins.io/t/jenkins-checkout-scm-plugin-can-not-authenticate-to-github-enterprise-cloud-wiht-pat-token/25696/5 "2025-01-13T20:06:04Z")

</div>

Thanks again Mark. That’s a good plan. I’m hoping an upgrade could be the solution here as I’ve seen things like that before were being in the latest version tends to sort out issues. I will work on this and come back to you as soon as I’ve tested.

---

<div class="post-metadata">

**Author:** ![shane.ohanlon](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@shane.ohanlon](https://community.jenkins.io/u/shane.ohanlon)\
**Post date:** [January 15, 2025, 11:35am UTC](https://community.jenkins.io/t/jenkins-checkout-scm-plugin-can-not-authenticate-to-github-enterprise-cloud-wiht-pat-token/25696/6 "2025-01-15T11:35:30Z")

</div>

Hey @MarkEWaite  
As advised i spun up a new jenkins based off of our production instance and upgraded it to the latest jenkins at the time which is 2.492. We are getting the same error in the pipeline when trying to use checkout scm to pull from github enterprise cloud. Thanks.

```auto
Started by user unknown or anonymous
11:26:24 Connecting to https://api.github.com using token/ ****** (The github XXXXXXXXXX PAT token from bot user token. XXXXXXXXXX PAT token for Jenkins Curalate)
Obtained Jenkinsfile from d36353b7f6851398501389de87952588a50b00a7
Loading library BuildUtils@master
Examining curalate/jenkins-pipeline
Attempting to resolve master as a branch
Resolved master as branch master at revision da5294d5a09554c4167f1b0030a220ffe34d09c6
Selected Git installation does not exist. Using Default
The recommended git tool is: NONE
using credential curalatebot-github
 > git rev-parse --resolve-git-dir /var/lib/jenkins/workspace/YYYYYYYYYY_master@libs/8c41ca8fdcded5ccc0952cd283bf5f68adcdad0328709480d89e441a33b38acd/.git # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/curalate/jenkins-pipeline.git # timeout=10
Fetching upstream changes from https://github.com/curalate/jenkins-pipeline.git
 > git --version # timeout=10
 > git --version # 'git version 1.9.1'
using GIT_ASKPASS to set credentials Auth Token for user curalatebot on github
 > git fetch --tags --progress https://github.com/curalate/jenkins-pipeline.git +refs/heads/master:refs/remotes/origin/master # timeout=10
Checking out Revision da5294d5a09554c4167f1b0030a220ffe34d09c6 (master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f da5294d5a09554c4167f1b0030a220ffe34d09c6 # timeout=10
Commit message: "chore: Assign DevEx owners in cura.meta.yml [PD-236076]"
[Pipeline] Start of Pipeline
[Pipeline] properties
[Pipeline] echo
Building with config = BuildConfig{deployableBranches=main|master|release|development, infraRoot= .infra}
[Pipeline] node
Running on static-jenkins-agent-default-prod-java8-01-test

 in /home/ubuntu/workspace/YYYYYYYYYY_master_2
[Pipeline] {
[Pipeline] ansiColor
[Pipeline] {

[Pipeline] timestamps
[Pipeline] {
[Pipeline] sh
11:26:36 + sudo find /home/ubuntu/workspace/YYYYYYYYYY_master_2/ -mindepth 1 -delete
[Pipeline] checkout
11:26:36 The recommended git tool is: NONE
11:26:38 using credential token-XXXXXXXXXX
11:26:38 Cloning the remote Git repository
11:26:38 Cloning with configured refspecs honoured and without tags
11:26:38 ERROR: Error cloning remote repo 'origin'
11:26:38 hudson.plugins.git.GitException: Command "git fetch --no-tags --progress -- https://github.com/XXXXXXXXXX/YYYYYYYYYY.git +refs/heads/master:refs/remotes/origin/master" returned status code 128:
11:26:38 stdout: 
11:26:38 stderr: remote: Repository not found.
11:26:38 fatal: repository 'https://github.com/XXXXXXXXXX/YYYYYYYYYY.git/' not found
11:26:38  
11:26:38 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2848)
11:26:38 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2184)
11:26:38 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
11:26:38 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:877)
11:26:38 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:170)
11:26:38 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161)
11:26:38 at hudson.remoting.UserRequest.perform(UserRequest.java:225)
11:26:38 at hudson.remoting.UserRequest.perform(UserRequest.java:50)
11:26:38 at hudson.remoting.Request$2.run(Request.java:391)
11:26:38 at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:81)
11:26:38 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
11:26:38 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
11:26:38 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
11:26:38 at java.base/java.lang.Thread.run(Thread.java:833)
11:26:38 Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to static-jenkins-agent-default-prod-java8-01-test
11:26:38 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1923)
11:26:38 at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:384)
11:26:38 at hudson.remoting.Channel.call(Channel.java:1112)
11:26:38 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:153)
11:26:38 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:26:38 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
11:26:38 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:26:38 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
11:26:38 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:138)
11:26:38 at PluginClassLoader for git-client/jdk.proxy118/jdk.proxy118.$Proxy209.execute(Unknown Source)
11:26:38 at PluginClassLoader for git//hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1221)
11:26:38 at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1311)
11:26:38 at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1278)
11:26:38 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
11:26:38 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:101)
11:26:38 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:88)
11:26:38 at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
11:26:38 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
11:26:38 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
11:26:38 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
11:26:38 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
11:26:38 at java.base/java.lang.Thread.run(Thread.java:831)
11:26:38 ERROR: Error cloning remote repo 'origin'
11:26:38 Retrying after 10 seconds
11:26:38 Cloning repository https://github.com/XXXXXXXXXX/YYYYYYYYYY.git
11:26:38 > git init /home/ubuntu/workspace/YYYYYYYYYY_master_2 # timeout=10
11:26:38 Fetching upstream changes from https://github.com/XXXXXXXXXX/YYYYYYYYYY.git
11:26:38 > git --version # timeout=10
11:26:38 > git --version # 'git version 2.18.0'
11:26:38 using GIT_ASKPASS to set credentials The github XXXXXXXXXX PAT token from bot user token. XXXXXXXXXX PAT token for Jenkins Curalate
11:26:38 > git fetch --no-tags --progress -- https://github.com/XXXXXXXXXX/YYYYYYYYYY.git +refs/heads/master:refs/remotes/origin/master # timeout=10
11:26:48 The recommended git tool is: NONE
11:26:48 using credential token-XXXXXXXXXX
11:26:48 Fetching changes from the remote Git repository
11:26:48 Fetching without tags
11:26:49 ERROR: Error fetching remote repo 'origin'
11:26:49 hudson.plugins.git.GitException: Failed to fetch from https://github.com/XXXXXXXXXX/YYYYYYYYYY.git
11:26:49 at PluginClassLoader for git//hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:999)
11:26:49 at PluginClassLoader for git//hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1240)
11:26:49 at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1311)
11:26:49 at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1278)
11:26:49 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
11:26:49 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:101)
11:26:49 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:88)
11:26:49 at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
11:26:49 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
11:26:49 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
11:26:49 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
11:26:49 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
11:26:49 at java.base/java.lang.Thread.run(Thread.java:831)
11:26:49 Caused by: hudson.plugins.git.GitException: Command "git fetch --no-tags --progress -- https://github.com/XXXXXXXXXX/YYYYYYYYYY.git +refs/heads/master:refs/remotes/origin/master" returned status code 128:
11:26:49 stdout: 
11:26:49 stderr: remote: Repository not found.
11:26:49 fatal: repository 'https://github.com/XXXXXXXXXX/YYYYYYYYYY.git/' not found
11:26:49  
11:26:49 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2848)
11:26:49 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2184)
11:26:49 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
11:26:49 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:170)
11:26:49 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161)
11:26:49 at hudson.remoting.UserRequest.perform(UserRequest.java:225)
11:26:49 at hudson.remoting.UserRequest.perform(UserRequest.java:50)
11:26:49 at hudson.remoting.Request$2.run(Request.java:391)
11:26:49 at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:81)
11:26:49 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
11:26:49 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
11:26:49 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
11:26:49 at java.base/java.lang.Thread.run(Thread.java:833)
11:26:49 Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to static-jenkins-agent-default-prod-java8-01-test
11:26:49 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1923)
11:26:49 at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:384)
11:26:49 at hudson.remoting.Channel.call(Channel.java:1112)
11:26:49 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:153)
11:26:49 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:26:49 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
11:26:49 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:26:49 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
11:26:49 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:138)
11:26:49 at PluginClassLoader for git-client/jdk.proxy118/jdk.proxy118.$Proxy212.execute(Unknown Source)
11:26:49 at PluginClassLoader for git//hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:997)
11:26:49 at PluginClassLoader for git//hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1240)
11:26:49 at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1311)
11:26:49 at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1278)
11:26:49 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
11:26:49 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:101)
11:26:49 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:88)
11:26:49 at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
11:26:49 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
11:26:49 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
11:26:49 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
11:26:49 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
11:26:49 at java.base/java.lang.Thread.run(Thread.java:831)
11:26:49 ERROR: Error fetching remote repo 'origin'
11:26:49 Retrying after 10 seconds
11:26:48 > git rev-parse --resolve-git-dir /home/ubuntu/workspace/YYYYYYYYYY_master_2/.git # timeout=10
11:26:48 > git config remote.origin.url https://github.com/XXXXXXXXXX/YYYYYYYYYY.git # timeout=10
11:26:48 Fetching upstream changes from https://github.com/XXXXXXXXXX/YYYYYYYYYY.git
11:26:48 > git --version # timeout=10
11:26:48 > git --version # 'git version 2.18.0'
11:26:48 using GIT_ASKPASS to set credentials The github XXXXXXXXXX PAT token from bot user token. XXXXXXXXXX PAT token for Jenkins Curalate
11:26:48 > git fetch --no-tags --progress -- https://github.com/XXXXXXXXXX/YYYYYYYYYY.git +refs/heads/master:refs/remotes/origin/master # timeout=10
11:26:59 The recommended git tool is: NONE
11:26:59 using credential token-XXXXXXXXXX
11:26:59 Fetching changes from the remote Git repository
11:26:59 Fetching without tags
11:26:59 ERROR: Error fetching remote repo 'origin'
11:26:59 hudson.plugins.git.GitException: Failed to fetch from https://github.com/XXXXXXXXXX/YYYYYYYYYY.git
11:26:59 at PluginClassLoader for git//hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:999)
11:26:59 at PluginClassLoader for git//hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1240)
11:26:59 at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1311)
11:26:59 at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1278)
11:26:59 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
11:26:59 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:101)
11:26:59 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:88)
11:26:59 at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
11:26:59 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
11:26:59 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
11:26:59 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
11:26:59 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
11:26:59 at java.base/java.lang.Thread.run(Thread.java:831)
11:26:59 Caused by: hudson.plugins.git.GitException: Command "git fetch --no-tags --progress -- https://github.com/XXXXXXXXXX/YYYYYYYYYY.git +refs/heads/master:refs/remotes/origin/master" returned status code 128:
11:26:59 stdout: 
11:26:59 stderr: remote: Repository not found.
11:26:59 fatal: repository 'https://github.com/XXXXXXXXXX/YYYYYYYYYY.git/' not found
11:26:59  
11:26:59 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2848)
11:26:59 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2184)
11:26:59 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
11:26:59 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:170)
11:26:59 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161)
11:26:59 at hudson.remoting.UserRequest.perform(UserRequest.java:225)
11:26:59 at hudson.remoting.UserRequest.perform(UserRequest.java:50)
11:26:59 at hudson.remoting.Request$2.run(Request.java:391)
11:26:59 at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:81)
11:26:59 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
11:26:59 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
11:26:59 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
11:26:59 at java.base/java.lang.Thread.run(Thread.java:833)
11:26:59 Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to static-jenkins-agent-default-prod-java8-01-test
11:26:59 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1923)
11:26:59 at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:384)
11:26:59 at hudson.remoting.Channel.call(Channel.java:1112)
11:26:59 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:153)
11:26:59 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:26:59 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
11:26:59 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:26:59 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
11:26:59 at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:138)
11:26:59 at PluginClassLoader for git-client/jdk.proxy118/jdk.proxy118.$Proxy212.execute(Unknown Source)
11:26:59 at PluginClassLoader for git//hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:997)
11:26:59 at PluginClassLoader for git//hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1240)
11:26:59 at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1311)
11:26:59 at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1278)
11:26:59 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
11:26:59 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:101)
11:26:59 at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:88)
11:26:59 at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
11:26:59 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
11:26:59 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
11:26:59 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
11:26:59 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
11:26:59 at java.base/java.lang.Thread.run(Thread.java:831)
11:26:59 ERROR: Error fetching remote repo 'origin'
11:26:59 ERROR: Maximum checkout retry attempts reached, aborting
[Pipeline] sh
11:26:59 + sudo find /home/ubuntu/workspace/YYYYYYYYYY_master_2/ -mindepth 1 -delete
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }

[Pipeline] // ansiColor
[Pipeline] }
11:26:59 > git rev-parse --resolve-git-dir /home/ubuntu/workspace/YYYYYYYYYY_master_2/.git # timeout=10
11:26:59 > git config remote.origin.url https://github.com/XXXXXXXXXX/YYYYYYYYYY.git # timeout=10
11:26:59 Fetching upstream changes from https://github.com/XXXXXXXXXX/YYYYYYYYYY.git
11:26:59 > git --version # timeout=10
11:26:59 > git --version # 'git version 2.18.0'
11:26:59 using GIT_ASKPASS to set credentials The github XXXXXXXXXX PAT token from bot user token. XXXXXXXXXX PAT token for Jenkins Curalate
11:26:59 > git fetch --no-tags --progress -- https://github.com/XXXXXXXXXX/YYYYYYYYYY.git +refs/heads/master:refs/remotes/origin/master # timeout=10
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Error fetching remote repo 'origin'

GitHub has been notified of this commit’s build result

Finished: FAILURE

```

## Jenkins setup:

```auto
Jenkins: 2.492
OS: Linux - 4.4.0-148-generic
Java: 17-ea - Private Build (OpenJDK 64-Bit Server VM)
---
ace-editor:1.1
amazon-ecs:1.49
analysis-model-api:12.9.1
ansicolor:1.0.5
ant:511.v0a_a_1a_334f41b_
antisamy-markup-formatter:162.v0e6ec0fcfcf6
apache-httpcomponents-client-4-api:4.5.14-208.v438351942757
apache-httpcomponents-client-5-api:5.4-135.v4da_349961256
asm-api:9.7.1-97.v4cc844130d97
authentication-tokens:1.119.v50285141b_7e1
aws-credentials:242.v8d05df911e3d
aws-java-sdk:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-api-gateway:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-autoscaling:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-cloudformation:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-cloudfront:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-codebuild:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-codedeploy:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-ec2:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-ecr:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-ecs:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-efs:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-elasticbeanstalk:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-elasticloadbalancingv2:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-iam:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-kinesis:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-lambda:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-logs:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-minimal:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-organizations:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-secretsmanager:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-sns:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-sqs:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-ssm:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk2-core:2.29.34-9.v117ff2a_65538
aws-java-sdk2-ec2:2.29.34-9.v117ff2a_65538
aws-lambda:0.5.10
badge:2.5
blueocean:1.27.16
blueocean-autofavorite:1.2.5
blueocean-bitbucket-pipeline:1.27.16
blueocean-commons:1.27.16
blueocean-config:1.27.16
blueocean-core-js:1.27.16
blueocean-dashboard:1.27.16
blueocean-display-url:2.4.3
blueocean-events:1.27.16
blueocean-git-pipeline:1.27.16
blueocean-github-pipeline:1.27.16
blueocean-i18n:1.27.16
blueocean-jira:1.27.16
blueocean-jwt:1.27.16
blueocean-personalization:1.27.16
blueocean-pipeline-api-impl:1.27.16
blueocean-pipeline-editor:1.27.16
blueocean-pipeline-scm-api:1.27.16
blueocean-rest:1.27.16
blueocean-rest-impl:1.27.16
blueocean-web:1.27.16
bootstrap4-api:4.6.0-6
bootstrap5-api:5.3.3-1
bouncycastle-api:2.30.1.79-254.vfdb_814e7791e
branch-api:2.1206.vd9f35001c95c
build-name-setter:2.4.3
build-timeout:1.33
caffeine-api:3.1.8-133.v17b_1ff2e0599
checks-api:2.2.1
cloudbees-bitbucket-branch-source:933.3.1
cloudbees-folder:6.976.v4dc79fb_c458d
cobertura:1.17
code-coverage-api:4.99.0
command-launcher:116.vd85919c54a_d6
commons-compress-api:1.27.1-1
commons-httpclient3-api:3.1-3
commons-lang3-api:3.17.0-84.vb_b_938040b_078
commons-text-api:1.12.0-129.v99a_50df237f7
conditional-buildstep:1.4.3
config-file-provider:980.v88956a_a_5d6a_d
coverage:1.16.1
credentials:1405.vb_cda_74a_f8974
credentials-binding:687.v619cb_15e923f
dark-theme:514.va_3ea_73d65dc1
dashboard-view:2.523.v673d549dfee5
data-tables-api:2.1.8-1
datadog:9.0.1
depgraph-view:1.0.5
display-url-api:2.209.v582ed814ff2f
docker-commons:445.v6b_646c962a_94
docker-workflow:580.vc0c340686b_54
dtkit-api:3.0.3
durable-task:581.v299a_5609d767
ec2:1801.v526399543dca_
ec2-fleet:3.2.0
echarts-api:5.5.1-5
eddsa-api:0.3.0-4.v84c6f0f4969e
email-ext:1866.v14fa_6d201654
emoji-symbols-api:16.0-26.v9818ff7423f0
envinject:2.919.v009a_a_1067cd0
envinject-api:1.199.v3ce31253ed13
extended-choice-parameter:382.v5697b_32134e8
extensible-choice-parameter:1.8.1
external-monitor-job:215.v2e88e894db_f8
favorite:2.221.v19ca_666b_62f5
font-awesome-api:6.6.0-2
forensics-api:2.7.0
ghprb:1.42.2
git:5.7.0
git-client:6.1.0
git-parameter:0.10.0
git-server:126.v0d945d8d2b_39
github:1.40.0
github-api:1.321-478.vc9ce627ce001
github-branch-source:1809.v088b_5f22c768
github-pr-coverage-status:2.2.0
golang:1.4
groovy:457.v99900cb_85593
groovy-postbuild:267.va_df06de9fa_fa_
gson-api:2.11.0-85.v1f4e87273c33
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-30.v7e777411b_148
htmlpublisher:1.37
instance-identity:201.vd2a_b_5a_468a_a_6
ionicons-api:74.v93d5eb_813d5f
jackson2-api:2.17.0-379.v02de8ec9f64c
jakarta-activation-api:2.1.3-1
jakarta-mail-api:2.1.3-1
javadoc:280.v050b_5c849f69
javax-activation-api:1.2.0-7
javax-mail-api:1.6.2-10
jaxb:2.3.9-1
jdk-tool:80.v8a_dee33ed6f0
jenkins-asgard:2.0
jenkins-design-language:1.27.16
jersey2-api:2.44-151.v6df377fff741
jira:3.13
jjwt-api:0.11.5-112.ve82dfb_224b_a_d
jnr-posix-api:3.1.20-125.vb_6ec4b_21b_15e
job-dsl:1.90
job-import-plugin:3.6
jobConfigHistory:1294.v961a_b_707546a_
joda-time-api:2.13.0-93.v9934da_29b_a_e9
jquery:1.12.4-3
jquery-detached:1.2.1
jquery3-api:3.7.1-2
jsch:0.2.16-86.v42e010d9484b_
json-api:20241224-119.va_dca_a_b_ea_7da_5
json-path-api:2.9.0-118.v7f23ed82a_8b_8
junit:1312.v1a_235a_b_94a_31
ldap:770.vb_455e934581a_
lockable-resources:1327.ved786b_a_197e0
mailer:489.vd4b_25144138f
mapdb-api:1.0.9-40.v58107308b_7a_7
matrix-auth:3.2.3
matrix-project:840.v812f627cb_578
maven-plugin:3.24
mercurial:1260.vdfb_723cdcc81
metrics:4.2.21-458.vcf496cb_839e4
mina-sshd-api-common:2.14.0-138.v6341ee58e1df
mina-sshd-api-core:2.14.0-138.v6341ee58e1df
momentjs:1.1.1
naginator:1.481.vcb_b_384a_3de89
next-build-number:66.v4b_4762172d53
node-iterator-api:55.v3b_77d4032326
nodejs:1.6.2
nvm-wrapper:0.1.7
okhttp-api:4.11.0-183.va_87fc7a_89810
pam-auth:1.11
parameterized-trigger:806.vf6fff3e28c3e
pipeline-aws:1.45
pipeline-build-step:540.vb_e8849e1a_b_d8
pipeline-github-lib:61.v629f2cc41d83
pipeline-graph-analysis:216.vfd8b_ece330ca_
pipeline-groovy-lib:745.vdf6077913de0
pipeline-input-step:508.v584c0e9a_2177
pipeline-milestone-step:119.vdfdc43fc3b_9a_
pipeline-model-api:2.2218.v56d0cda_37c72
pipeline-model-definition:2.2218.v56d0cda_37c72
pipeline-model-extensions:2.2218.v56d0cda_37c72
pipeline-rest-api:2.34
pipeline-stage-step:312.v8cd10304c27a_
pipeline-stage-tags-metadata:2.2218.v56d0cda_37c72
pipeline-stage-view:2.34
pipeline-utility-steps:2.18.0
plain-credentials:183.va_de8f1dd5a_2b_
plugin-usage-plugin:4.8
plugin-util-api:5.1.0
popper-api:1.16.1-3
popper2-api:2.11.6-5
prism-api:1.29.0-18
promoted-builds:965.vcda_c6a_e0998f
pubsub-light:1.18
python:1.3
rebuild:332.va_1ee476d8f6d
resource-disposer:0.25
run-condition:1.7
saml:4.514.vfd5088cc4ed7
scm-api:698.v8e3b_c788f0a_6
script-security:1369.v9b_98a_4e95b_2d
slack:751.v2e44153c8fe1
snakeyaml-api:2.3-123.v13484c65210a_
sonar:2.17.3
sse-gateway:1.27
ssh-agent:376.v8933585c69d3
ssh-credentials:349.vb_8b_6b_9709f5b_
ssh-slaves:3.1021.va_cc11b_de26a_e
sshd:3.330.vc866a_8389b_58
structs:338.v848422169819
subversion:1281.vc8837f91a_07a_
theme-manager:262.vc57ee4a_eda_5d
thinBackup:2.1.1
throttle-concurrents:2.16
timestamper:1.28
token-macro:400.v35420b_922dcb_
translation:1.16
trilead-api:2.147.vb_73cc728a_32e
variant:60.v7290fc0eb_b_cd
warnings-ng:11.12.0
windows-slaves:1.8.1
workflow-aggregator:600.vb_57cdd26fdd7
workflow-api:1336.vee415d95c521
workflow-basic-steps:1058.vcb_fc1e3a_21a_9
workflow-cps:4007.vd705fc76a_34e
workflow-durable-task-step:1400.v7a_fd50a_091de
workflow-job:1476.v90f02a_225559
workflow-multibranch:795.ve0cb_1f45ca_9a_
workflow-scm-step:427.v4ca_6512e7df1
workflow-step-api:678.v3ee58b_469476
workflow-support:936.v9fa_77211ca_e1
ws-cleanup:0.48
xunit:3.1.5
xvfb:1.2

```

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [January 16, 2025, 9:06pm UTC](https://community.jenkins.io/t/jenkins-checkout-scm-plugin-can-not-authenticate-to-github-enterprise-cloud-wiht-pat-token/25696/7 "2025-01-16T21:06:36Z")

</div>

> [@shane.ohanlon](#):
>
> We are getting the same error in the pipeline when trying to use checkout scm to pull from github enterprise cloud.

Seems like you have enough information to submit a bug report or an enhancement request.

---

<div class="post-metadata">

**Author:** ![jtroyer](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jtroyer](https://community.jenkins.io/u/jtroyer)\
**Post date:** [February 11, 2025, 9:38pm UTC](https://community.jenkins.io/t/jenkins-checkout-scm-plugin-can-not-authenticate-to-github-enterprise-cloud-wiht-pat-token/25696/8 "2025-02-11T21:38:20Z")

</div>

We have the same issue with Github Enterprise Cloud Personal Access Token authentication and the Jenkins credential store. We also migrated over from standard [Github.com](http://Github.com) to Enterprise Cloud. Have you found a solution?

---

<div class="post-metadata">

**Author:** ![om-kmezmacs](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/om-kmezmacs/32/14135_2.png) [@om-kmezmacs](https://community.jenkins.io/u/om-kmezmacs)\
**Post date:** [April 4, 2025, 1:36pm UTC](https://community.jenkins.io/t/jenkins-checkout-scm-plugin-can-not-authenticate-to-github-enterprise-cloud-wiht-pat-token/25696/9 "2025-04-04T13:36:49Z")

</div>

Any update on this?  
just stumbled upon it while investigating our sudden auth fail after some delayed and overdue updates…
