git-changelog: Causing access token deletion in account
Describe the bug
When I use the git-changelog package in a bash script which is responsible for bumping my own package version, creating a tag and then generating changelog. You can see the script here wpdetect/release-tag.sh.
Sounds strange! I know. But I have pin pointed the cause of token deletion by commenting on/off every line in above script. And when the changelog generation was commented out, my token didn’t get deleted.
To Reproduce Steps to reproduce the behavior:
- Create an access token with appropriate permissions and scopes.
- Fork https://github.com/IamLizu/wpdetect
cdintowpdetectchmod +x release-tag.sh./release-tag.sh- Check your GitHub access token page, the token you had created is gone!
Expected behavior It should not delete the token from account.
System (please complete the following information):
git-changelogversion: 1.0.1- Python version: 3.10.6
- OS: Linux
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22 (10 by maintainers)
Commits related to this issue
- fix: Remove GitHub tokens from remote URL Issue #50: https://github.com/pawamoy/git-changelog/issues/50 — committed to pawamoy/git-changelog by pawamoy a year ago
Great, thanks for letting me know 😃
I am sure this will work now, but I will let you know tomorrow from my end.
Yes, it’s almost done, will release later doday 😃
Yeah, I just doubled checked the combined one. And it still works.
Thanks! I found this as well, really helpful: https://gist.github.com/magnetikonline/073afe7909ffdd6f10ef06a00bc3bc88
Thanks for the explanation ❤️
GitHub new tokens stars with something else, please allow me a moment to check and post here.
Hahahaha OK that confirms it. Sorry about this mess! I’ll push a fix 🙂
Yeah got so many “Your GitHub access token has been found in IamLizu/wpdetect and revoked”.
HAHAHA, I screamed in terror a bit. And then I understood.
Here is the explanation:
You should have received some emails or alerts in your account about the token deletions 🙂
So, it’s not really git-changelog’s fault, but maybe we could do something about it, like remove any token from the remote before using it to generate links 🙂
Thanks a lot, will try now!
OK sorry but there’s 0 chance git-changelog can delete a token on GitHub. That’s just not possible. We don’t do any HTTP request, even less API calls to GitHub. The only things we run in a subprocess are
git configandgit log. We don’t usegit commitorgit pushourselves, we only write in a local file. Authentication is always done by the user and is irrelevant to git-changelog.I’ll keep it open until you answer my two previous questions so I can try for myself, and then I’ll either:
Hello, thanks for the report.
I think your sentence is incomplete here?
Anyway, if I understand correctly, your token on GitHub itself gets deleted? That’s seems impossible to be caused by git-changelog haha, but I believe your investigation and will investigate as well 🙂
How do I set up authentication with the access token? What kind of permissions must I set on the token?