简体   繁体   中英

Sublime Git pushing host key verification failed

So basically I pushed my project to gitlab by sublimegit.

Now I made a format to my windows7 and installed windows10, I placed the project folder in the same path as I used to have on old OS.

I have the privatekey from which I can generate id_rsa - I checked it and it also generates the same public key to gitlab.

I placed id_rsa to Users/Me/.ssh folder and to Program files/Git/etc/ssh and also created a folder in Git called .ssh and place it in there also.

Pushing to git@gitlab.placeholder.ee:HTML/stuff.git
Host key verification failed.

fatal: Could not read from remote repository.

Can anyone see what kinda mistake I'm doing?

You should have id_rsa (private key) and id_rsa.pub (public key) both in C:/Users/Me/.ssh

Check that then environment variable HOME is defined (to %USERPROFILE% ), which should be the case if you are calling git-cmd.bat or git-bash.bat , packaged in the latest git for Windows .

As mentioned by the OP , and seen in this question , you also need to add the server key in the C:/Users/Me/.ssh/known_host file.

ssh-keyscan -t rsa github.com > ~/.ssh/known_hosts

(this is what the step 5 of GitHub SSH / Generating SSH keys does: that applies also for a gitlab server)

基本上我只需要known_hosts

ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts

您可以安装两个(github.exe / git.exe)客户端,只是尝试从PATH中移出新的客户端

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM