在openshift上被允许拒绝(publickey,gssapi-keyex,gssapi-with-mic)

spe*_*0ne 24 git git-push public-key openshift

我在修改我的装备时遇到问题.我试图运行rhc设置,我也删除了我的.ssh文件夹并再次执行rhc设置,但这也没有用.

不知道发生了什么变化,但它在几个小时前工作了.

>git push -u <GEAR_NAME> master
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

>git remote add devstage3 -f ssh://<GEAR_ID>@<GEAR_NAME>-<GEAR-DOMAIN>.rhcloud.com/~/git/<GEAR_DOMAIN>.git/ 
Run Code Online (Sandbox Code Playgroud)

此外,我试图启动一个不同的齿轮并承诺,但我得到同样的错误:

Updating <GEAR_NAME>
The authenticity of host '<GEAR_NAME>-<GEAR-DOMAIN>.rhcloud.com (<GEAR_IP>)' can't be established.
RSA key fingerprint is <KEY_FINGERPRINT>.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '<GEAR_NAME>-<GEAR-DOMAIN>.rhcloud.com,<GEAR_IP>' (RSA) to the list of known hosts.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch <GEAR_NAME>
Run Code Online (Sandbox Code Playgroud)

bor*_*993 22

如果您使用的是Windows,则可以尝试以下步骤:

  1. 通常你可以找到你的ssh公钥 c:\\users\\YOUR_USERNAME\\.ssh

  2. 将您的openshift公钥复制到您的git的ssh-key文件夹

    假设我们有git in d:\\git

    然后我们需要将公钥复制c:\\users\\YOUR_USERNAME\\.ssh到d:\\git\\.ssh

  3. 试试它是否有效

  • 我的 e:\\Git 中没有 .ssh 文件夹。? (2认同)

spe*_*0ne 17

删除密钥:rhc sshkey-remove您也可以从管理控制台删除它们,方法是访问https://openshift.redhat.com/app/console/settings

完成后,上传公钥(将id_rsa.pub的内容复制到管理控制台):https: //openshift.redhat.com/app/console/keys/new

保存.在此尝试之后git clone,它应该适合您.


aze*_*ati 8

对我有用的是使用Git Bash生成密钥

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
Run Code Online (Sandbox Code Playgroud)

然后将密钥添加到ssh-agent此处所述

https://help.github.com/articles/generating-a-new-ssh-key/


Rod*_*bio 5

有同样的问题,浪费了几个小时,我正在使用centos 7.以下解决了我的问题.

在linux上:

  1. "cd /home/your_username/.ssh"
  2. 查看"id_rsa.pub"并复制内容
  3. 在openshift中,从UI创建一个键并粘贴"*.pub"文件中的内容
  4. 保存新密钥
  5. 尝试从本地计算机重新连接

希望以上有所帮助.请注意,在Mac上它工作从单词go只有linux游戏我的错误.