-
-
Notifications
You must be signed in to change notification settings - Fork 327
Hatch ignores global .gitignore, leaking private keys #1958
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
Comments
Hey there Stavros, good to see you again! There is another similar issue open which I will fix by introducing an option to use the Git CLI. Something to keep in mind about why I choose files by default is because building from the source directory on your local machine or CI is not the only way projects are built and indeed it is the rarest situation. More often than not people build packages using a GitHub release archive or even more frequently the source distributions from PyPI. In these cases there is no Git checkout to speak of. |
Haha, hello! The internet is small. I definitely agree, but it's usually a good idea to ignore all the files in all the |
Yes ignore files within the repo are used by default but Git takes into account locations other than the project directory which is the issue here. |
Agreed, but I mean, are you planning to call out to |
To call it directly when the new option is enabled. |
I see, thanks! |
Happy to help! I will post the other issue here sometime tonight when I find it. OT: this is still one of my favorite contributions skorokithakis/catt#92 |
Hahah that was great, I loved it. Such a good PR. |
I built a package using hatch, which, unbeknownst to me, ignored my
~/.gitignore_global
, including in the package my.envrc
with secret keys.This is a fairly major footgun, as I imagine quite a few packages like this will include files that their authors didn't intend (files which git ignores, so the authors don't realize will be included).
The text was updated successfully, but these errors were encountered: