執行 sudo git push -u origin master時出現錯誤 Permis

一:

  執行 sudo git push -u origin master時出現錯誤    Permission denied (public key) 。git

二:

      1.添加個人密鑰,使用命令:github

     ssh-add ~/learngit/tavenssh

        2.使用ssh -v git@github.com測試,能夠看到驗證經過:
    debug1: Authentication succeeded (publickey).測試



待解決問題ui

taven@taven-Aspire-E5-551G:~$ ssh-add ~/learngit/taven.pub
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/home/taven/learngit/taven.pub' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
taven@taven-Aspire-E5-551G:~$ cd learngit/
taven@taven-Aspire-E5-551G:~/learngit$ ls
readme.txt  taven  taven.pub
taven@taven-Aspire-E5-551G:~/learngit$ sudo git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
taven@taven-Aspire-E5-551G:~/learngit$
spa

相關文章
相關標籤/搜索