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,则可以尝试以下步骤:
通常你可以找到你的ssh公钥 c:\\users\\YOUR_USERNAME\\.ssh
将您的openshift公钥复制到您的git的ssh-key文件夹
假设我们有git in d:\\git
然后我们需要将公钥复制c:\\users\\YOUR_USERNAME\\.ssh到d:\\git\\.ssh
试试它是否有效
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,它应该适合您.
对我有用的是使用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/
有同样的问题,浪费了几个小时,我正在使用centos 7.以下解决了我的问题.
在linux上:
希望以上有所帮助.请注意,在Mac上它工作从单词go只有linux游戏我的错误.
| 归档时间: |
|
| 查看次数: |
69004 次 |
| 最近记录: |