When creating a new project, on the final step gitlab give me instructions to setup my repo, but the URL to the repo don't work. For instance, to add remote branch, I got:
git remote add origin git@git.srv.com:root/home.git
Note: My gitlab instance is running on a virtual machine whom host forward SSH's requests on port 1122 to the VM's port 22. So locally gitlab is reach on port 22.
Given URL doesn't work
Pushing
Keep asking for password. Neither my SSH passphrase nor my account's password works:
git push -u manu master
Password:
Password:
Password:
Permission denied (publickey,keyboard-interactive).
fatal: The remote end hung up unexpectedly
Cloning
Same here, keep prompting for password:
git clone git@git.srv.com:1122/root/home.git
Cloning into 'home'...
Password:
Fixing the URL (add protocol and port)
If I simply add a ssh:// prefix and the port to the server (:1122/) everything work smoothly:
git remote add manu ssh://git@git.srv.com:1122/root/home.git