I correctly pointed to key file in ssh config:
$ cat ~/.ssh/config
Host <host>
IdentityFile /cygdrive/v/poma.pem
$ ssh git@<host>
PTY allocation request failed on channel 0
Welcome to GitLab, Roman!
Connection to <host> closed.
and using cygwin's git
$ which git
/usr/bin/git
$ git --version
git version 2.1.4
$ /cygdrive/c/Program\ Files\ \(x86\)/Git/bin/git.exe --version
git version 1.9.5.msysgit.1
But when I try to push it displays a password prompt:
$ git remote -v
origin git@<host>:poma/deploy.git (fetch)
origin git@<host>:poma/deploy.git (push)
$ git push -u origin master
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Why is that happening?
As a workaround, try doing the same setup (~/.ssh/config) on Windows only (no cygwin, with the latest git-for-windows (unzip anywhere you want PortableGit-2.4.4.2-3rd-release-candidate-64-bit.7z.exe
, and you got git 2.4.4: see more here)
By using a git-cmd.exe (or git-bash.exe), you will get an environment where HOME has been set to your %USERPROFILE%
.
In it, put your .ssh/config file, and try again pushing from your repo.
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