gitdebiancredential-manager

How to remember github's PAT when pushing into repository from Debian machine?


I have git on my system and github account. Historically when I want to pull, I was needed to type github login and password. That was beautiful because I remember this data by heart. Now I need to enter PAT (Personal Access Token) instead of password because of github restrictions. It works, but I can not remember PAT by heart. So, I want git not to ask me a github password (PAT) every time I push something in my own repo. I have found a recommendation to cast

git config --global credentials.helper store

but this script did nothing. Github recommends me to use Git Credential Manager but downloading a 100+MB software is not an option for my tiny SSD.

Is there any way not to destroy my programming process with the need to take my PAT data from somehow? Something likegit push password=./pat.txt will be enough good.


Solution

  • You may choose to use gh in place of git for interacting with repositories on GitHub. gh has a size of about 10 MB and will cache your credentials by default (without requiring you to install any extension).

    GitHub CLI will automatically store your Git credentials for you when you choose HTTPS as your preferred protocol for Git operations and answer "yes" to the prompt asking if you would like to authenticate to Git with your GitHub credentials.

    ~ GitHub CLI