1

This happens when pushing to the remote repo:

enter image description here

I created a repo in the past and I didn't need to type the password. Why is not apply to all repo?

Kiraly Zoltan
  • 1,383
  • 3
  • 10
  • 7
  • This is a repeated question. Kindly refer this link. https://stackoverflow.com/questions/7773181/git-keeps-prompting-me-for-password?noredirect=1&lq=1 – Muema Mar 09 '18 at 19:42

2 Answers2

2

It's because you are using https:// which requires a password not the git:// URL which uses your SSH key.

GitHub actually have a doc about this https://help.github.com/articles/which-remote-url-should-i-use

Abizern
  • 146,289
  • 39
  • 203
  • 257
0

You have added remote with https url syntax:

git remote add origin https://github.com/zoliky/abctest.git

While if you want you ssh key to be used, you should use ssh url syntax:

git remote add origin git@github.com:zoliky/abctest.git

Now to change that, do this:

git remote set-url origin git@github.com:zoliky/abctest.git

Github's explanation is here

Vlad Alive
  • 46
  • 4