gp credential-helper blocks basic auth for unknown hosts
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.8k
- Forks
- 1.4k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 5
Description
Bug description
One of the changes GitPod makes to custom Docker images seems to be that it adds a ".gitconfig" file for the gitpod user, containing the following:
[credential]
helper = /usr/bin/gp credential-helper
This is a bit impolite, and interferes with the user's ability to provide credentials via (e.g.) basic authentication to non-GitHub servers. (Running with GIT_TRACE=1 shows that /usr/bin/gp credential-helper is being invoked for all repositories.) So, for example, if a user adds a non-GitHub remote that uses basic authentication and tries to pull from or push to it, they'll continually get an authentication error.
It would probably be better if GitPod added something more like the following fragment in .gitconfig:
[credential "https://github.com"]
helper = /usr/bin/gp credential-helper
(the same as if git config --global credential.https://github.com.helper "/usr/bin/gp credential-helper" were invoked), as this limits the credential-helper to operating on GitHub repositories.
Steps to reproduce
- Add a non-GitHub remote that uses basic authentication
- Push to the remote
Expected behavior
- User should be prompted to supply credentials
Example repository
No response
Anything else?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating where GitPod adds the gitpod user's .gitconfig and the /usr/bin/gp credential-helper entry. Reproduce the issue with a non-GitHub remote using basic authentication, then verify that GitHub credentials still use the helper while other hosts can prompt for credentials.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100