Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 'gp credential-helper' told us to quit #8416

Merged
merged 1 commit into from
Feb 23, 2022
Merged

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Feb 23, 2022

Description

fix 'gp credential-helper' told us to quit

see https://git-scm.com/docs/git-credential for detail

In most cases, this means the attributes given in the input will be repeated in the output, but Git may also modify the credential description, for example by removing the path attribute when the protocol is HTTP(s) and credential.useHttpPath is false.

If a helper outputs a quit attribute with a value of true or 1, no further helpers will be consulted, nor will the user be prompted (if no credential has been provided, the operation will then fail).

Related Issue(s)

Fixes #8408

How to test

  1. open a workspace
  2. run git clone --mirror -- 'https://gitlab.ebizmarts.com/ebizmarts/magento2-pos-api-request.git' '/workspace/.composer/cache/vcs/https---gitlab.ebizmarts.com-ebizmarts-magento2-pos-api-request.git/'
  3. you will see a prompt ask your a username and password

Release Notes

NONE

Documentation

@codecov
Copy link

codecov bot commented Feb 23, 2022

Codecov Report

Merging #8416 (e98f4fc) into main (0f1aaa7) will decrease coverage by 1.13%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8416      +/-   ##
==========================================
- Coverage   12.31%   11.17%   -1.14%     
==========================================
  Files          20       18       -2     
  Lines        1161      993     -168     
==========================================
- Hits          143      111      -32     
+ Misses       1014      880     -134     
+ Partials        4        2       -2     
Flag Coverage Δ
components-gitpod-cli-app 11.17% <0.00%> (ø)
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/gitpod-cli/cmd/credential-helper.go 6.66% <0.00%> (ø)
components/local-app/pkg/auth/pkce.go
components/local-app/pkg/auth/auth.go

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f1aaa7...e98f4fc. Read the comment docs.

Copy link
Contributor

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well, code LGTM

@roboquat roboquat merged commit 343ae26 into main Feb 23, 2022
@roboquat roboquat deleted the pd/credential-8408 branch February 23, 2022 16:04
@jeanp413
Copy link
Member

@iQQBot could you add this test case to the How to smoke test section so we don't break it again 🙏
git clone --mirror -- 'https://gitlab.ebizmarts.com/ebizmarts/magento2-pos-api-request.git' '/workspace/.composer/cache/vcs/https---gitlab.ebizmarts.com-ebizmarts-magento2-pos-api-request.git/'

// How to smoke test:
// - Open a public git repository and try pushing some commit with and without permissions in the dashboard, if no permissions a popup should appear in vscode
// - Open a private git repository and try pushing some commit with and without permissions in the dashboard, if no permissions a popup should appear in vscode
// - Private npm package
// - Create a private git repository for an npm package e.g https://github.com/jeanp413/test-private-package
// - Start a workspace, then run `npm install github:jeanp413/test-private-package` with and without permissions in the dashboard
// - Private npm package no access
// - Open this workspace https://github.com/jeanp413/test-gp-bug and run `npm install`
// - Observe NO notification with this message appears `Unknown repository '' Please grant the necessary permissions.`

@mustard-mh
Copy link
Contributor

We can file an issue about smoke test todo

@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Feb 24, 2022
@jeanp413
Copy link
Member

Don't think an issue is needed for just adding two line comments 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production release-note-none size/M team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

credential helper '/usr/bin/gp credential-helper' told us to quit
4 participants