Git asks for password for invalid url

After creating the repository on GitHub, I follow the instructions provided by 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 the above URL, the actual username is replaced with user.)

Then they ask me (by Ksshaskpass) about

Password for https: // xxxxxxxx@github.com ':

(Username is not set.) This xxxxxxxxis actually the initial password that I used when creating the account on GitHub. And my password is void, so I can’t push the data.

I expect an exit as shown below .

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

~/.gitconfig, . ( .) ~/.git . , , , .

- ?

Env: openSUSE 13.2, git -2.1.4-13.1.x86_64

+4
1

URL ssh.
https , git pull/push/fetch.

, ssh-:

  • ssh ( , )
    ssh-keygen -t rsa -C "your@email"

  • home/.ssh ( Users/<your user>.ssh ),


sh github?

  • github
  • ()
    github account settigns
  • SSH keys
    ssh key section
  • Add ssh key
    Add ssh key
  • URL git remote set-url origin <new_ssh_url>

: -)

+4

All Articles