Title: Github token is leaked when used as a part of remote URL · Issue #1284 · gitpython-developers/GitPython · GitHub
Open Graph Title: Github token is leaked when used as a part of remote URL · Issue #1284 · gitpython-developers/GitPython
X Title: Github token is leaked when used as a part of remote URL · Issue #1284 · gitpython-developers/GitPython
Description: Github allows usage of personal access tokens with remote URLs in the format: https://
Open Graph Description: Github allows usage of personal access tokens with remote URLs in the format: https://
X Description: Github allows usage of personal access tokens with remote URLs in the format: https://<token>@github.com/owner/repo.git or https://<token>:x-oauth-basic@github.com/owner/repo.git If suc...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/1284
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Github token is leaked when used as a part of remote URL","articleBody":"Github [allows](https://github.blog/2012-09-21-easier-builds-and-deployments-using-git-over-https-and-oauth/) usage of personal access tokens with remote URLs in the format:\r\n\r\n```\r\nhttps://\u003ctoken\u003e@github.com/owner/repo.git\r\n```\r\nor\r\n```\r\nhttps://\u003ctoken\u003e:x-oauth-basic@github.com/owner/repo.git\r\n```\r\n\r\nIf such URL is used with `Remote`, if some error related to the access happens, it (in the example below token is `foobar`) can be leaked via exception message, like the following:\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"start.py\", line 119, in \u003cmodule\u003e\r\n sys.exit(run_main())\r\n ...\r\ngit.exc.GitCommandError: Cmd('git') failed due to: exit code(128)\r\n cmdline: git push --set-upstream --force ....\r\n stderr: 'remote: some error.\r\nfatal: unable to access 'https://foobar:x-oauth-basic@github.com/FooBarCorp/some-repo/': The requested URL returned error: 403'\r\n```\r\n\r\nIt would be nice to have internal mechanism to prevent such leakage.","author":{"url":"https://github.com/0xnm","@type":"Person","name":"0xnm"},"datePublished":"2021-07-05T09:53:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/1284/GitPython/issues/1284"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9244e7db-dc2f-a099-515d-0c53b4fda7ed |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 95D0:29F2E0:25B8:2ED9:69695D99 |
| html-safe-nonce | b3d4b480fa3a7e635419160af2e7fa74f4696e362f45153ee8917ac754472e0b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NUQwOjI5RjJFMDoyNUI4OjJFRDk6Njk2OTVEOTkiLCJ2aXNpdG9yX2lkIjoiNjU2NTU5MTExNTU5MzUwNjIwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 06523a7bbf91fc4799b4562ace45d12cbdc2b12e2d49a2b2de923927c28d2592 |
| hovercard-subject-tag | issue:936911941 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gitpython-developers/GitPython/1284/issue_layout |
| twitter:image | https://opengraph.githubassets.com/690e8146747a72891f1bab5d6a170f6acdc567e288520499f8a15cf71f8379ba/gitpython-developers/GitPython/issues/1284 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/690e8146747a72891f1bab5d6a170f6acdc567e288520499f8a15cf71f8379ba/gitpython-developers/GitPython/issues/1284 |
| og:image:alt | Github allows usage of personal access tokens with remote URLs in the format: https:// |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | 0xnm |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9db5f28da7e24035385d7f349f17890cbe016a939ddd7952be0f07b862094f5a |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4e59fe66217d3c72925af2a341ae3a8f2b5b5b2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width