Also, why does github delete PATs ?
This is to protect users incase they accidentally expose their token on a public repository. You should have had a notification email about this. Please let me know if you didn’t receive it.
why is it beeing pushed to a public repository?
It looks like your PAT was pushed to a public repository here:
I think you could have done something like this instead:
This will stop GitHub from recognizing it as a PAT and automatically deleting it.
Here is the command I used:
$ docker run jcansdale/gpr encode bdf415fad17ac6b85935c36ef7883d317e79375d
An encoded token can be included in a public repository without being automatically deleted by GitHub.
These can be used in various package ecosystems like this:
A NuGet `nuget.config` file:
<add key="Username" value="PublicToken" />
<add key="ClearTextPassword" value="bdf415fad17ac6b85935c36ef7883d317e79375d" />
A Maven `settings.xml` file:
An npm `.npmrc` file:
In this case I used the token from the npm example snippet. You should only need to do this once!
Does that help at all?