I have a weird issue here. Our Maven release plugin fails because it can't push a tag to Git. The following fails:
git push ssh://PU0S:[email protected]/u0r0-SS/workspace-proxy.git workspace-proxy-server-1.10.1
[ERROR] Permission denied (publickey).
[ERROR] fatal: Could not read from remote repository.
[ERROR]
[ERROR] Please make sure you have the correct access rights
[ERROR] and the repository exists.
If I remote into the machine and try pushing with an URL of the form I get the same error:
git push ssh://PU0S:[email protected]/u0r0-SS/workspace-proxy.git
If I just push using the defined remote, it succeeds:
git push origin master
The above makes me certain that the .ssh
keys are available on the machine. Why does the first form fail?
Any idea why the following command fails
git clone ssh://git-eim.fg.com/u0r0-SS/workspace-proxy.git
but the following succeedsssh://[email protected]/u0r0-SS/workspace-proxy.git
?
What is special aboutgit@
?
git@
means the user which will receive the push will be git. The authentication is then managed by the public key used for ssh.
This differs from PU0S:xL8q
, which is a username/password, only required when using an https url.
For an ssh url, you never push "as you" (PU0S) but as the account managing the git repos on the server side.
That is why, for instance, you always push at [email protected]
.
If git push origin master
succeeds, that means the url associated to the remote named 'origin
' is correctly formed.
Typically ssh://[email protected]/u0r0-SS/workspace-proxy.git
.
Check with git remote -v
, or, since git 2.7, with git remote get-url origin
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With