Unable to pull updates from Git repository: Permission denied: Could not read from remote repository

Follow

Comments

14 comments

  • Avatar
    Zahid Mahmood

    I am experiencing an error when trying to set up a second (or multiple) Git repos on my server. I get the error:

    Public key for the server at 'github.com' is already known in...

    Could these issues be related?

    0
    Comment actions Permalink
  • Avatar
    Jan Černín

    Hello,

    we are experiencing this issue, and the temporary resolution helped, thank you.

    Is there a possiblity to watch over the bug resolution case? I would like to stay updated on the issue, and know when (and if) this get fixed. Thank you.

    0
    Comment actions Permalink
  • Avatar
    Alexandr Tumanov

    @Jan, you can subscribe to the article to stay tuned. Additional information can be found here: https://support.plesk.com/hc/en-us/articles/115002200894-How-to-subscribe-to-Plesk-articles 

    0
    Comment actions Permalink
  • Avatar
    Artyom Baranov

    @Zahid Mahmood,

    Hello! Could you please provide us with exact error? What is under "Public key for the server at 'github.com' is already known in" ?

    0
    Comment actions Permalink
  • Avatar
    Unknown User

    I did a copy of the .shh directory.

    But it's using a .ssh/git_known_hosts file from another domain.

    When i delete the git_known_hosts file there it will create a new one(also there)

    0
    Comment actions Permalink
  • Avatar
    Unknown User

    Please, fix this bug! 

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Helen,

    The issue from the provided screenshot seems to be different from the one in this article.
    Additionally, I see no articles with a similar issue.

    To find the solution I would suggest to submit a support request.

    0
    Comment actions Permalink
  • Avatar
    Unknown User

    If anyone from reg.ru is trying to work the same problem as me, please, read support answer carefully, it helped me:

     

    Здравствуйте! Насколько мы видим, вы указали в качестве удаленного Git репозитория команду git: git clone git@bitbucket.org:username/***.git Адрес репозитория имеет следующий вид: git@bitbucket.org:username/***.git Однако, указанный вами адрес репозитория на данный момент не существует. Для решения проблемы вам необходимо указать адрес существующего репозитория, после чего скопировать публичный ключ в ваш репозиторий bitbucket. Подробнее в официальной инструкции - https://docs.plesk.com/ru-RU/onyx/administrator-guide/website-management/git-support/using-remote-git-hosting.75848/ Как добавить публичные ключи на BitBucket - https://www.youtube.com/watch?v=-ElU6WhNLn4 Интерактивный курс по использованию Git - https://githowto.com/ru

    Вы уже оценили ответ

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Helen, thanks for sharing.

    1
    Comment actions Permalink
  • Avatar
    Muhammad Nadir Abbas

    Thank You Very Much, That took a big burden off of me. <3

    0
    Comment actions Permalink
  • Avatar
    Martijn

    Hi Ivan Postnikov, we have something that looks the same as Zahid's problem. I don't see any follow up on that.

    To our knowledge we didn't change anything in Github settings, or the server. And this morning it worked fine. And has worked fine for the last couple of months.

    We have 2 connected github projects, both on different subdomains of the same main domain. We use the SSH way to pull the updates. and a webhook for the automatic pull after pushed to master.

    As said, it worked this morning until I noticed on one of the projects a minor change wasn't showing up on the site after I pushed it. At this point I manually pressed the button in the plesk panel to pull updates. This worked once or twice.

    Then we got the following error: Public key for the server at 'github.com' is already known in '/var/www/vhosts/maindomain.nl/.ssh/git_known_hosts'. error: Ref refs/heads/master is at c034a*** but expected 9c105**** From github.com:****/*** ! 9c105d9..c034abf master -> master (unable to update local ref) 

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Martjin,

    Our Support Department has met such issue once. However, the exact root cause wasn't found. In that case,the solution was to remove the git repository and to re-add the git repository. Probably, this was a misconfiguration on the git side.

    If this won't resolve the issue, consider submitting a request for Plesk Support, as the deeper investigation will be required.

    0
    Comment actions Permalink
  • Avatar
    Martijn

    Hello Ivan Postnikov,

    The issue was caused by a issue on the Github.com side. 

    https://www.githubstatus.com/incidents/42hkbtl63nmn

    I still had to remove the repository in question and re-add it to get rid of the error. But prior to that, the other project was already functioning ok again, responding to the webhook etc.

    It all seems to be working correctly again at the moment.

    Thanks for your input. 

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Martjin,

    Thank you for sharing this information, it may be useful for other Pleskians!

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request