简体   繁体   中英

Mysterious Gitlab SSH Key in PhpStorm

I am trying to push project files to a network repository on Gitlab using PhpStorm.

I have installed Git and generated an SSH key with a password, and added the key to Gitlab.

在此处输入图片说明

I have also copied my Gitlab profile's SSH URL to the clipboard.

在此处输入图片说明

Now, when I go to PhpStorm's VCS->Git->Push , click on "Define remote", Paste the Gitlab SSH URL into the "URL" field, and click "OK", PhpStorm displays a message containing a very different key than the one I set up in Gitlab.

Here are pics of the steps I take in PhpStorm:

Step 1:

在此处输入图片说明

Step 2:

在此处输入图片说明

Step 3:

在此处输入图片说明

Look closely at this dialog box. It is listing a different key than the one I added to my Profile in Gitlab.

If I click "Yes" or "No", it asks me for the key's password. If type in the password that was defined for the other key, PhpStorm does not accept it.

Where could the key shown in Step 3 come from?

The key shown in the popup box is the SSH Host Key of the server that hosts your GitLab instance and is used to verify that you are connecting to the server you expected to connect to.

It has no relation to your SSH key you set in GitLab.

As for your final question, the password that PHPStorm is asking for could be the password of the git user. Checkout this question and this question for help resolving that issue.

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