Permission denied (publickey,gssapi-keyex,gssapi-with-mic) on openshift

前端 未结 11 1120
既然无缘
既然无缘 2021-02-03 23:52

I am having issues with committing changes to my gear. I have tried to run rhc setup, I also deleted my .ssh folder and executed rhc setup again but that also didnt work.

相关标签:
11条回答
  • 2021-02-03 23:54

    please check if you have changed to another account.

    i encountered this problem when my account changed to root.

    I am using ubuntu.

    I solved this problem by the following cmds

    rm ~/.openshift/ -rf
    rm ~/.ssh/* -rf
    rhc setup
    

    and i encountered the following error:

    chmod: 更改".git/FETCH_HEAD" 的权限: 不允许的操作
    

    solved by :

    sudo chmod 777 .git/FETCH_HEAD
    

    then:

    git pull
    

    got:

    Already up-to-date.
    

    everything goes find.

    0 讨论(0)
  • you have to check in ~/.ssh/ if exists a file id_rsa.pub and id_rsa if not you have to create it using openssh or if exists a file with extension .pub duplicate it and rename the copy as id_rsa.pub then do the same with id_rsa. this work with google compute engine. I've tried

    0 讨论(0)
  • 2021-02-03 23:58

    I fixed the problem by setting up proxy for ssh: ~/.ssh/config

    ProxyCommand /bin/connect.exe -H proxy:8080 %h %p
    
    Host rhcloud.com
    User myemailasrhclogin@gmail.com
    Port 22
    Hostname rhcloud.com
    IdentityFile "C:\users\username\.ssh\id_rsa"
    TCPKeepAlive yes
    IdentitiesOnly yes
    

    SSH in git behind proxy on windows 7

    My initial mistake was to use appname.rhcloud.com as Host or Hostname. And yes, adding your public key to OpenShift is also necessary.

    0 讨论(0)
  • 2021-02-04 00:00

    I had Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
    when cloning with git clone ssh://<<repo_created_by_openshift>>.

    App was created with Openshift's website, not with rhc app create.
    My SSH key was ok, reimporting it to Openshift didn't help, nor did expiring sessions, and so on.
    I didn't want to generate a new key.

    What finally worked was using:
    rhc git-clone -a <app_name>> instead of bare git clone <<repo_address>>.
    You may have to expire sessions as well.

    0 讨论(0)
  • 2021-02-04 00:01

    what worked for me was to generate the keys using Git Bash

    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    

    and then add the key to ssh-agent as described here

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

    0 讨论(0)
  • 2021-02-04 00:07

    Also make sure your ~/.ssh/id_rsa file has proper permissions required by rhc:

    chmod 600 ~/.ssh/id_rsa
    
    0 讨论(0)
提交回复
热议问题