git 报错集锦 ...持续更新

从github上面clone项目到本地时候

操作

$ git clone [email protected]:pangudashu/php7-internal.git

报错:

Cloning into ‘php7-internal’…
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

解决:
  • github缺少本地计算机ssh公钥信息
    • 本地计算机,git Bash应用,命令行执行 cat ~/.ssh/id_rsa.pub ,打印出来的内容为ssh公钥信息。
    • GitHub网站 – settings – SSH Keys – New SSH key – 将打印出来的公钥信息拷贝到 Key 当中,取名,保存
成果:
  • $ git clone [email protected]:pangudashu/php7-internal.git
    Cloning into ‘php7-internal’…
    remote: Enumerating objects: 2533, done.
    remote: Total 2533 (delta 0), reused 0 (delta 0), pack-reused 2533
    Receiving objects: 100% (2533/2533), 5.13 MiB | 2.37 MiB/s, done.
    Resolving deltas: 100% (1526/1526), done.

猜你喜欢

转载自blog.csdn.net/qq_31766287/article/details/84838934