升到 OS X Sierra 之後
如果從 GitLab 下指令要做 clone
碰到以下奇怪的錯誤

1
2
3
4
5
6
$ git clone git@gitlab.com:nilliu/pyScrapy.git
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

可以試著用 ssh-add -K
把缺失的 key 加到 SSH Agent

又或者可以指定 key 去做 clone

1
$ ssh-agent sh -c 'ssh-add ~/.ssh/id_rsa; git fetch user@host'