When you want to add on your local workstation a remote repository so you can push your work there, you may have executed a command similar to this one :
- git remote add web ssh://example.server.tld/home/user/git/project.git
and then, when you would like to push your modifications (and create a master branch), you did
- git push web +master:refs/heads/master
but this time, git asked for your password, and if your workstation username is different from your username on the server, well, you gonna have a bad time !
Any way, i have the solution for you:
First you have to remove the remote from your local repository :
- git remote rm web
and then recreate it but this time changing the url style
- git remote add web email@example.com:/home/user/git/project.git
and now, when you push your work
Counting objects: x, done.
Delta compression using up to x threads.
Compressing objects: 100% (x/x), done.
Writing objects: 100% (x/x), 7.21 KiB, done.
Total x (delta 0), reused 0 (delta 0)
* [new branch] master -> master