GitLab clone failed after upgarde to OS X Sierra
Mar 21, 2017翻譯 · 原文地址
升到 OS X Sierra 之後
如果從 GitLab 下指令要做 clone
碰到以下奇怪的錯誤123456$ git clone git@gitlab.com:nilliu/pyScrapy.gitPermission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.
可以試著用 ssh-add -K
把缺失的 key 加到 SSH Agent
又或者可以指定 key 去做 clone1$ ssh-agent sh -c 'ssh-add ~/.ssh/id_rsa; git fetch user@host'