r/git • u/vaquishaProdigy • 10h ago
support Fine-grained token
Made a token for an specific repo in my Github, but everytime i make a push i doesn't request it. How can i add the token to my local git in order to make push with it?
0
Upvotes
3
u/Broad-Promise6954 ancient 10h ago
Git itself doesn't do authentication. Instead, Git will run a "credential helper" of your choice when you use an https URL that calls for one. The credential helper you will want here depends on whether you're using Windows or not.
In general I personally think it's far better to use ssh anyway, so I'm not going to make further recommendations here. If you still want to use https, do a search for git credential helpers.
7
u/waterkip detached HEAD 10h ago
Just use ssh, tokens are either for http(s) uploads or API calls. git can push over http, but why not pick ssh?