lilydjwg / nvchecker

New version checker for software releases
MIT License
428 stars 69 forks source link

Can nvchecker use `~/.git-credentials` to get github token by default #228

Open Freed-Wu opened 1 year ago

Freed-Wu commented 1 year ago

after gh auth login, A ~/.git-credentials will be created:

https://Freed-Wu:gho_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX@github.com

Can we get github token from here? It will be convenient to not need to write token to config toml.

lilydjwg commented 1 year ago

That's a different kind of token. Did you check whether it works or not?

Freed-Wu commented 1 year ago

It can work for me:

[xilinx-cmake]
source = "github"
use_latest_tag = true
github = "Xilinx/cmakeModules"
token = "gho_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
lilydjwg commented 1 year ago

Is there any documentation about ~/.git-credentials?

Freed-Wu commented 1 year ago

https://git-scm.com/docs/git-credential

lilydjwg commented 1 year ago

There is no mention of ~/.git-credentials in that doc. I'll try to figure out later myself.

lilydjwg commented 1 year ago

No, no ~/.git-credentials is created. Instead, ~/.config/gh/hosts.yml is created.