• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

cynchanpin

  • 博客园
  • 联系
  • 订阅
  • 管理

View Post

centos: git clone提示Permission denied publickey 问题

问题:

Initialized empty Git repository in /data1/mouxuan/fastsocket-private/.git/
Permission denied (publickey).
fatal: The remote end hung up unexpectedly


解决步骤:


1、cd ~/.ssh

2、ssh-keygen -t rsa -C you@Email.com




遇到 提示一路 回车

遇到有Y 输入Y


3、ssh-add id_rsa

 若出现: Could not open a connection to your authenticationagent.

输入:ssh-agent bash  在使用 ssh-add id_rsa



4、登录github.com --AccountSetting--ssh  点击Add

将id_rsa.pub 文件里的 内容加入进去  


最后git clone 成功 (with ssh)

git clone with http 失败 


參考:http://bbs.gsmcn.cn/thread-2474-1-1.html  


posted on 2017-06-30 17:28  cynchanpin  阅读(1245)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3