首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

mac虚拟机本地通过git下传项目到github时出现的诡异有关问题

2012-11-01 
mac虚拟机本地通过git上传项目到github时出现的诡异问题错误为:Permission denied (publickey).fatal: The

mac虚拟机本地通过git上传项目到github时出现的诡异问题
错误为:

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

我的 remote add origin url 默认为
git@github.com:<your_name你懂的>/first_app.git

google了好久大部分的解决方法为 ssh git@github.com 我不知道这是有啥作用,推测是不是系统邮件ssh配置的修改问题?
反正我虚拟机上试了一下没作用,问题依然。

google的收获问题应该跟这个url有关了,然后在github看到项目的url地址还可以换个https的格式,好吧试试。

首先删除原来的origin
git remote rm origin
然后
git remote add origin https://<name同上>@github.com/<name同上>/first_app.git
然后
git push -u origin master

看到
Branch master set up to track remote branch master from origin.

ok应该成功了
github刷新,果然在了

热点排行