jenkinsci / jenkinsci/git-plugin

[JENKINS-32404] Password removed from repository URL during polling

Open
#2,788 1 comment 0 reactions 0 assignees View on GitHub
component:git-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

To build content of private repository, the git url in job is configured as https://user:apitoken@​github.com/group/repo. The cloning and form validation seems to be happy with this, but git polling seems to remove the api token and fail to access the repository:

```
> git ls-remote -h https://user@​github.com/group/repo # timeout=10
FATAL: hudson.plugins.git.GitException: Command "git ls-remote -h https://user@​github.com/group/repo" returned status code 128:
stdout:
stderr: error: The requested URL returned error: 403 while accessing https://user@​github.com/group/repo/info/refs

fatal: HTTP request failed

```

---
Originally reported by olivergondza, imported from: Password removed from repository URL during polling


  • status: Open
  • priority: Minor
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-02

Raw content of original issue

To build content of private repository, the git url in job is configured as https://user:apitoken@github.com/group/repo. The cloning and form validation seems to be happy with this, but git polling seems to remove the api token and fail to access the repository:


> git ls-remote -h https://user@github.com/group/repo # timeout=10

FATAL: hudson.plugins.git.GitException: Command "git ls-remote -h https://user@github.com/group/repo" returned status code 128:
stdout:
stderr: error: The requested URL returned error: 403 while accessing https://user@github.com/group/repo/info/refs

fatal: HTTP request failed


environment

```
git 2.3.5

git client 1.17.1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.