Git 无法推送一些参考?
我们在 sourcerepo.com 上托管了一个裸露的 git 存储库。有时,在推送时,我们会收到“错误:无法推送某些引用”,但推送成功,如果缺少任何内容,则不清楚是什么。这并不是常见的问题,即先拉后推。请参阅:
2t2% git pull
remote: Counting objects: 57, done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 30 (delta 25), reused 0 (delta 0)
Unpacking objects: 100% (30/30), done.
From tiptap.sourcerepo.com:tiptap/2t2
cb6c0e5..1dfea54 master -> origin/master
Merge made by recursive.
app/stylesheets/facebox.scss | 11 +++
app/stylesheets/screen.scss | 28 ++++++--
app/views/answers/tip_detail.html.erb | 2 +
app/views/shared/_tip_box.html.erb | 26 ++++---
app/views/tip/tip_answer.js.erb | 37 ++++++++++-
config/application.rb | 2 +-
public/javascripts/application.js | 1 -
public/javascripts/tip_animation.js | 116 +++++++++++++++++++++++++++++++++
public/stylesheets/facebox.css | 11 +++
9 files changed, 212 insertions(+), 22 deletions(-)
mode change 100644 => 100755 app/views/shared/_tip_box.html.erb
mode change 100644 => 100755 app/views/tip/tip_answer.js.erb
mode change 100644 => 100755 config/application.rb
mode change 100644 => 100755 public/javascripts/application.js
create mode 100755 public/javascripts/tip_animation.js
2t2% git push
Counting objects: 18, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 1.54 KiB, done.
Total 10 (delta 7), reused 0 (delta 0)
To [email protected]:tiptap/2t2.git
1dfea54..faf6014 master -> master
error: failed to push some refs to '[email protected]:tiptap/2t2.git'
我能找到的有关此错误的所有讨论要么是关于“先拉后推”,要么是关于“包对象死亡”;该错误在野外意味着什么,我们应该采取什么措施?
We have a bare git repository hosted on sourcerepo.com. Sometimes, when pushing, we get "error: failed to push some refs", but the push succeeds, and if anything's missing, it's not apparent what. This is NOT the common problem where you have to pull before you can push; see:
2t2% git pull
remote: Counting objects: 57, done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 30 (delta 25), reused 0 (delta 0)
Unpacking objects: 100% (30/30), done.
From tiptap.sourcerepo.com:tiptap/2t2
cb6c0e5..1dfea54 master -> origin/master
Merge made by recursive.
app/stylesheets/facebox.scss | 11 +++
app/stylesheets/screen.scss | 28 ++++++--
app/views/answers/tip_detail.html.erb | 2 +
app/views/shared/_tip_box.html.erb | 26 ++++---
app/views/tip/tip_answer.js.erb | 37 ++++++++++-
config/application.rb | 2 +-
public/javascripts/application.js | 1 -
public/javascripts/tip_animation.js | 116 +++++++++++++++++++++++++++++++++
public/stylesheets/facebox.css | 11 +++
9 files changed, 212 insertions(+), 22 deletions(-)
mode change 100644 => 100755 app/views/shared/_tip_box.html.erb
mode change 100644 => 100755 app/views/tip/tip_answer.js.erb
mode change 100644 => 100755 config/application.rb
mode change 100644 => 100755 public/javascripts/application.js
create mode 100755 public/javascripts/tip_animation.js
2t2% git push
Counting objects: 18, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 1.54 KiB, done.
Total 10 (delta 7), reused 0 (delta 0)
To [email protected]:tiptap/2t2.git
1dfea54..faf6014 master -> master
error: failed to push some refs to '[email protected]:tiptap/2t2.git'
All of the discussion I can find about this error is either about the pull-before-you-push or about pack-objects dying; what does the error mean in the wild, and what should we do about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您忘记创建第一次提交并开始推送,则可能会发生此错误。所以你需要创建第一个提交。
This error may occur if you forgot to create first commit and started push. So you need to create first commit.
当服务器终止长时间运行的进程或存在某些网络问题时,它可能会间歇性地发生。此外,服务器上可能有一个权限,其中存储库上的某些文件由不同的用途拥有。
It can happen intermittently when the server kills a long running process or there is some network issue. Also there might be a permission on server where some files on the repo are owned by a different use.
我有类似的问题。由于某种原因,我的
.git/config
文件中缺少[branch "master"]
。添加该行解决了问题。I had a similar problem. For some reason I was missing a
[branch "master"]
in my.git/config
file. Adding that line fixed the problem.这个问题来自于我的服务器端存储库初始化。
我做了 :
而不是 :
Push 现在可以工作了。 :)
This issue went from the server side repository initialization for me.
I did :
instead of :
Push works now. :)