gitpod-io / gitpod-io/gitpod

gp credential-helper blocks basic auth for unknown hosts

Open
#4,059 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

meta: never-stale type: feature request
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.