Skip to content

gp credential-helper blocks basic auth for unknown hosts #4059

Open
@arranstewart

Description

@arranstewart

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions