# GitHub server credential is configured with a good way but im getting 403 error

**URL:** <https://community.jenkins.io/t/github-server-credential-is-configured-with-a-good-way-but-im-getting-403-error/7408>\
**Category:** Using Jenkins\
**Created:** [May 16, 2023, 1:08pm UTC](https://community.jenkins.io/t/github-server-credential-is-configured-with-a-good-way-but-im-getting-403-error/7408 "2023-05-16T13:08:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![soukaina](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@soukaina](https://community.jenkins.io/u/soukaina)\
**Post date:** [May 16, 2023, 1:08pm UTC](https://community.jenkins.io/t/github-server-credential-is-configured-with-a-good-way-but-im-getting-403-error/7408/1 "2023-05-16T13:08:01Z")

</div>

Hello team,

Please, i need help my GitHub server credential is configured with a good way , because i’m getting Credentials verified for user soukaina-khalkhouli, rate limit: 4991 but weebhook triggers are o not workig im getting the below error:

```auto
Started on May 12, 2023, 4:16:37 PM
Started by event from 10.240.64.13 ⇒ / on Fri May 12 16:16:37 UTC 2023
Using strategy: Default
[poll] Last Built Revision: Revision 3c19ec6ac7ff358b90b5952f4c9b9be4a169be83 ()
The recommended git tool is: NONE
No credentials specified
 > git --version # timeout=10
 > git --version # 'git version 2.31.1'
 > git ls-remote -h -- # timeout=10
ERROR: polling failed in /home/jenkins/agent/workspace/cms-backend on non-root-jenkins-agent-python-f6v4w-zdp9l
hudson.plugins.git.GitException: Command "git ls-remote -h -- " returned status code 128:
stdout: 
stderr: remote: Password authentication is not available for Git operations.
remote: You must use a personal access token or SSH key.
remote: 
fatal: unable to access ': The requested URL returned error: 403

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2732)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2109)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2007)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1998)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:3613)
	at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:731)
	at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:690)
Caused: java.io.IOException
	at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:692)
	at org.jenkinsci.plugins.workflow.job.WorkflowJob.poll(WorkflowJob.java:622)
	at com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:125)
	at com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:151)
	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:123)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	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)
Done. Took 1.2 sec
No changes 

```

 ![Screenshot 2023-05-16 at 13.30.07](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/9/98ce70bb1122b8940ea77e7ac535c6a5dd56c66b.png)

---

<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:** [May 16, 2023, 1:15pm UTC](https://community.jenkins.io/t/github-server-credential-is-configured-with-a-good-way-but-im-getting-403-error/7408/2 "2023-05-16T13:15:50Z")

</div>

> [@soukaina](#):
>
> `remote: You must use a personal access token or SSH key.`

That message often means that you’ve entered your GitHub username and password as the credential in Jenkins. GitHub won’t accept that. You need to enter a personal access token that has been generated by GitHub.

---

<div class="post-metadata">

**Author:** ![soukaina](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@soukaina](https://community.jenkins.io/u/soukaina)\
**Post date:** [May 16, 2023, 1:35pm UTC](https://community.jenkins.io/t/github-server-credential-is-configured-with-a-good-way-but-im-getting-403-error/7408/3 "2023-05-16T13:35:35Z")

</div>

Hello @MarkEWaite ,

we have used personal access token as a secret text not username and password.

Regards

---

<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:** [May 16, 2023, 1:41pm UTC](https://community.jenkins.io/t/github-server-credential-is-configured-with-a-good-way-but-im-getting-403-error/7408/4 "2023-05-16T13:41:20Z")

</div>

> [@soukaina](#):
>
> we have used personal access token as a secret text not username and password.

That output looks like it is coming from a job that is running, not from a scan of the GitHub repository. The credentials configured in the system wide configuration of the GitHub server are used for repository scans. Credentials may defined in the jobs that are different than the credential that is defined at the system level.

Are you absolutely certain that the job definition is not using a credential that is the username and password of a user?

---

<div class="post-metadata">

**Author:** ![soukaina](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@soukaina](https://community.jenkins.io/u/soukaina)\
**Post date:** [May 16, 2023, 2:11pm UTC](https://community.jenkins.io/t/github-server-credential-is-configured-with-a-good-way-but-im-getting-403-error/7408/5 "2023-05-16T14:11:35Z")

</div>

@MarkEWaite  
In jenkins GitHub configuration level we have used **secret text** , but in build pipeline we have used credentials which we created in manage credentials in Jenkins which is in the format of username and password. **Password is provided by personnel access token from GitHub repository**.

---

<div class="post-metadata">

**Author:** ![soukaina](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@soukaina](https://community.jenkins.io/u/soukaina)\
**Post date:** [May 16, 2023, 2:33pm UTC](https://community.jenkins.io/t/github-server-credential-is-configured-with-a-good-way-but-im-getting-403-error/7408/6 "2023-05-16T14:33:37Z")

</div>

![Screenshot 2023-05-16 at 15.30.55](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/2/2703c3c945daaa3a26d3e860e6621da2cc84db84.png)  
1 is used for :github server configuration as a secret  
2 is used for : build pipeline as username and password
