osx - GitHub, HTTPS and Mac application -


i know ssh in github causes no problem (no username/password type everytime i.e.), need use https repo of mine.

now, git inited repo, committed, did git remote add origin https://github.com/user/repo.git as suggested github.

i git push -u origin master: first promped me username , password, , answered with:

remote: anonymous access user/repo.git denied. fatal: authentication failed 'https://github.com/user/repo.git/' 

i'm 300% sure typed right password (and tried again couple times anyway). googled here , there, , tried last chance: installing github app mac. entered credentials, entered 2-factor auth code sent me, , tried push again: time worked.

why? did github app behind scenes? has 2-factor auth?

anyway, able not download app on every machine setup, maybe automating process script.

your github password won't work if have activated two-factor authentication.

you need generate personal access token, explain in "configure git clients, github windows, not ask authentication".

that long (40 characters) password work github password without requiring second authentication.

the difference between pat (personnal access token) , github password account:

  • it doesn't required second step, but:
  • it more complex simple password (not meant remembered)
  • you can generate many want (one each different computer access github, instance)
  • you can revoke @ time (easier having change github password)

and can encrypt github credential in .netrc.gpg file, illustrate in "is there way skip password typing when using https:// github".
find far superior memory-caching mechanism (like credential-osxkeychain), since don't have type github (long , complex token) password @ each session.
type passphrase of gpg key, github login/token credential, or other credential have encrypted in ~/.netrc.gpg file.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -