after I typed git push I was asked to input password, which i did but it wasn't showing but still continued the i pressed enter but gave me invalid password. please is the password supposed to be our personal token access
Asked
Active
Viewed 127 times
0
-
Passwords are secrets; only those who know the secret can tell you. Nobody on StackOverflow should know the secret. Ask the people who *should* know, i.e., your colleagues or supervisors or professor or whoever. We *can* say, however, that on GitHub, tokens are passwords. Typing in a GitHub token is pretty hard, I wouldn't try to do that on a keyboard myself. – torek Jun 29 '22 at 02:22
-
Git supports things called *credential managers*. Find out what credential managers are available to you—this depends on your OS and Git installation—and set up whichever one is most suitable for you to hold your GitHub user name and token, preferably in a secure manner. Then you won't have to type it in. – torek Jun 29 '22 at 02:25
-
1Check the remote by `git remote -v`. If the url starts with `http` or `https`, see https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token. If it starts with `git@` or `ssh`, see https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent. – ElpieKay Jun 29 '22 at 02:28
-
1@ElpieKay: the fact that `git push` resulted in a demand for a "password" (not a "passphrase") implies that it's an `https` URL. Of course the OP might have mis-remembered a demand for an ssh key passphrase, so this is a good point. – torek Jun 29 '22 at 05:48
-
@torek You are right. But according to my experience, sometimes one (including me) may describe the question with ambiguous or wrong words, especially in a non-native language. – ElpieKay Jun 29 '22 at 06:11
1 Answers
0
I have trouble authenticate to GIT using the https protocol. That's why i am using the SSH method which makes everything much easier.
type git remote -v
I bet you will use https.
anyway,
Configuring the git to use SSH :
- start the agent
eval $(ssh-agent)
- Create a new ssh key
ssh-keygen -t rsa -b 4096 -C "your-git-hub-mail@mail.com"
It will ask you to enter a passphrase. (you can press 'Enter' few times)
copy the key
cat ~/.ssh/id_rsa.pub
Go to github, Click "Settings" => "SSH and GPG Keys" => "New Key"
Give it a name and past you key.

Shachar297
- 599
- 2
- 7