{"id":14069532,"url":"https://github.com/jongio/gh-setup-git-credential-helper","last_synced_at":"2025-07-09T06:05:34.005Z","repository":{"id":69184009,"uuid":"402854716","full_name":"jongio/gh-setup-git-credential-helper","owner":"jongio","description":"GitHub CLI Extension to add gh as a gitcredentials helper","archived":false,"fork":false,"pushed_at":"2021-11-12T02:32:58.000Z","size":17,"stargazers_count":40,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-24T04:44:06.637Z","etag":null,"topics":["gh-extension"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jongio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-09-03T17:49:25.000Z","updated_at":"2025-04-11T19:10:58.000Z","dependencies_parsed_at":"2024-02-24T13:54:33.486Z","dependency_job_id":null,"html_url":"https://github.com/jongio/gh-setup-git-credential-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongio%2Fgh-setup-git-credential-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongio%2Fgh-setup-git-credential-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongio%2Fgh-setup-git-credential-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongio%2Fgh-setup-git-credential-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jongio","download_url":"https://codeload.github.com/jongio/gh-setup-git-credential-helper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250566441,"owners_count":21451229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gh-extension"],"created_at":"2024-08-13T07:07:01.586Z","updated_at":"2025-04-24T04:44:13.489Z","avatar_url":"https://github.com/jongio.png","language":"Shell","funding_links":[],"categories":["others","🧩 Categories","Shell"],"sub_categories":["Miscellaneous"],"readme":"# GitHub CLI Extension - Setup Git Credential Helper\n\nWhen you fork a repo the default GITHUB_TOKEN has limited permissions that doesn't allow you to do common things like add secrets and doesn't allow you to use the GitHub CLI as a gitcredential helper.\n\nThis extension solves all of that for you.\n\nIt will:\n\n1. Clear the `GITHUB_TOKEN` variable, so `gh auth login` won't complain that it already has a value.\n2. Call `gh auth login`\n3. Set `gh auth git-credentials` as your gitcredentials helper.\n\n\nThe full context for this extension can be found here: https://blog.jongallant.com/2021/06/codespaces-gh-cli-git-credentials/\n\nHere are the related GitHub issues:\n\n- https://github.com/cli/cli/issues/3796\n- https://github.com/cli/cli/issues/3797\n- https://github.com/cli/cli/issues/3798\n\n\n\n## Installation\n\n1. Install [GitHub CLI v2.0+](https://github.com/cli/cli)\n1. Run `gh extension install jongio/gh-setup-git-credential-helper`\n\n## Run\n1. Run `gh setup-git-credential-helper` from within your Codespace or DevContainer\n1. You will see \"Successfully added 'gh auth git-credential' as your git credential helper.\" if it succeeded.  Please file an issue if you have any problems.\n\n## Uninstall\n1. Run `gh extension remove gh-setup-git-credential-helper`\n\n## Install in DevContainer\n\nSee the code in this repo in /.devcontainer to see how to add this to your devcontainer\n\n1. Copy the `github-debian.sh` script to library-scripts\n1. Add the install command to your Dockerfile\n    ```bash\n    RUN apt-get update \u0026\u0026 export DEBIAN_FRONTEND=noninteractive \u0026\u0026 bash /tmp/library-scripts/github-debian.sh\n    ```\n1. Manually run `gh setup-git-credential-helper` when your container starts.\n\n\n## Error Messages\n\nIncluding the following error messages for SEO - this extension should fix all of these issues.\n\n```\nfailed to fetch public key: \nHTTP 403: Resource not accessible by integration\n```\n\n```\nThe value of the GITHUB_TOKEN environment variable is being used for authentication.\nTo have GitHub CLI store credentials instead, first clear the value from the environment.\n```\n\n```\ngit push --set-upstream origin env-dev5\nremote: Invalid username or password.\nfatal: Authentication failed for 'https://github.com/jongio/golang-sample-app/'\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongio%2Fgh-setup-git-credential-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjongio%2Fgh-setup-git-credential-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongio%2Fgh-setup-git-credential-helper/lists"}