现在的位置: 首页 > 综合 > 正文

git push时遇到问题“fatal: No destination configured to push to.”

2019年11月02日 ⁄ 综合 ⁄ 共 628字 ⁄ 字号 评论关闭
  作者:zhanhailiang 日期:2014-12-02
[root@~/wade/lua/historyBrowsing]# git push
fatal: No destination configured to push to.

查了下相应手册:

[root@~/wade/lua/historyBrowsing]# git help push

原因是缺少推送的目标地址,解决方法有两种:

1. 添加“目标地址”参数:

[root@~/wade/lua/historyBrowsing]# git push git@github.com:billfeller/historyBrowsing.git
Counting objects: 7, done.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 482 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
To git@github.com:billfeller/historyBrowsing.git
   e218fec..6f0ca41  HEAD -> master

2. 设置默认参数:

[root@~/wade/lua/historyBrowsing]# git remote add origin git@github.com:billfeller/historyBrowsing.git
[root@~/wade/lua/historyBrowsing]# git push

抱歉!评论已关闭.