Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Git Repositories That Have SSH2 Key With Password

Discussion in 'Security' started by inetbizo, Apr 23, 2019.

  1. inetbizo

    inetbizo Well-Known Member

    Joined:
    Mar 28, 2008
    Messages:
    90
    Likes Received:
    2
    Trophy Points:
    58
    Location:
    Ocala, Florida, United States of America
    cPanel Access Level:
    Root Administrator
    Twitter:
    I would like to clone a repository on Github. On Github, I have stored my RSA 256 public key. This key is encrypted with a password. I cannot clone in cp repositories because you do not prompt for pass key.

    I wrote this into .bashrc

    Code:
    if [ ! -S ~/.ssh/ssh_auth_sock ]; then
      eval `ssh-agent`
      ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
    fi
    export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
    ssh-add -l > /dev/null || ssh-add

    My key is authorized in managed keys. I get this error:

    Error: “/usr/local/cpanel/3rdparty/bin/git” reported error code “128” when it ended: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

    See How can I run ssh-add automatically, without a password prompt?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,154
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. inetbizo

    inetbizo Well-Known Member

    Joined:
    Mar 28, 2008
    Messages:
    90
    Likes Received:
    2
    Trophy Points:
    58
    Location:
    Ocala, Florida, United States of America
    cPanel Access Level:
    Root Administrator
    Twitter:
    Code:
    Error: “/usr/local/cpanel/3rdparty/bin/git” reported error code “128” when it ended: Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
    Repo fork is public
    Code:
    git@github.com:denverprophitjr/minimal-mistakes.git
    Code:
    (subdomains/jekyll:2.4)[denverpr@pluto ~]$ ssh-agent
    SSH_AUTH_SOCK=/tmp/ssh-EgaMvXZYj1Do/agent.19943; export SSH_AUTH_SOCK;
    SSH_AGENT_PID=19944; export SSH_AGENT_PID;
    echo Agent pid 19944;
    ---
    .bashrc
    ---
    Code:
    if [ ! -S ~/.ssh/ssh_auth_sock ]; then
      eval `ssh-agent`
      ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
    fi
    export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
    ssh-add -l > /dev/null || ssh-add
    
    If I CLI clone, it's fine. If I use the UX, I get that error code.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #3 inetbizo, Apr 29, 2019
    Last edited by a moderator: Apr 29, 2019
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,272
    Likes Received:
    2,154
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @inetbizo,

    Can you open a support ticket so we can take a closer look? You can post the ticket number here and I'll link this thread to it.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice