github - Git asks a password for a wrong URL -


after creating repository @ github, follow instruction given github:

$ echo "# test" >> readme.md $ git init $ git add readme.md $ git commit -m "first commit" $ git remote add origin https://github.com/user/test.git $ git push -u origin master 

(in above url actual user name replaced user.)

then asked (by ksshaskpass)

password 'https://xxxxxxxx@github.com':

(the user name not asked.) xxxxxxxx initial password used when created account @ github. , password denied, can not push data.

i expecting output like following.

$ git push -u origin master username: <username> password: <password> 

i removed ~/.gitconfig, situation not change. (the username not asked yet.) there not exist directory ~/.git. suspect there wrong configuration file created long time ago, can not find it.

could give me hint phenomenon?

env: opensuse 13.2, git-2.1.4-13.1.x86_64

change remote url ssh.
https keeep asking password every time wish run git pull/push/fetch.

simply follow steps , set ssh key in no time:

  • generate new ssh key (or skip step if have key)
    ssh-keygen -t rsa -c "your@email"

  • once have key set in home/.ssh directory (or users/<your user>.ssh under windows), open , copy content


how add sh key github account?

  • login github account
  • click on rancher on top right (settings)
    github account settigns
  • click on ssh keys
    ssh key section
  • click on add ssh key
    add ssh key
  • paste key , save

  • change remote url git remote set-url origin <new_ssh_url>

and set go :-)


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -