Jenkins git permission denied solution

Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,hostbased).
fatal: Could not read from remote repository.

Solution:

  • copy ~/.ssh/id_rsa to /Users/Shared/Jenkins/.ssh/

  • copy ~/.ssh/id_rsa.pub to/Users/Shared/Jenkins/.ssh/

还是不可以的话

Load key "/Users/Shared/Jenkins/.ssh/id_rsa": Permission denied
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,hostbased).
fatal: Could not read from remote repository.

Solution:

  • 修改文件权限 chmod +r id_rsa

  • 修改文件属主 sudo chown -R “${USER:-$(jenkins)}”

    原文作者:TimBao
    原文地址: https://www.jianshu.com/p/541d49f02da5
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞