为什么我的git推送到HostGator共享主机失败? [英] Why is my git push to HostGator shared hosting failing?

查看:305
本文介绍了为什么我的git推送到HostGator共享主机失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将我的本地仓库部署到远程目录。我在这个远程目录中运行了 git init --bare ,并且使用添加了正确的ssh路径到我的本地git repo分支(named dev) git remote add server ssh://user@domain.com:2222 / path / to / repo



当我运行 git push server dev 我得到以下输出:

 计数对象:44,done 。 
使用多达8个线程的增量压缩。
压缩对象:100%(37/37),完成。
写作对象:完成100%(44/44),89.58 KiB。
共计44(增量2),再利用27(△2)
错误:无法读取551dd5c5d67e3b2da4074d8f15a59a324a063a03
致命:无法穿越提交0615b940c3247e3547de1379ab09a4a6bb614252
错误的父母:无法读取551dd5c5d67e3b2da4074d8f15a59a324a063a03
致命:无法遍历提交0615b940c3247e3547de1379ab09a4a6bb614252
的父母到ssh://user@domain.com:2222 / path / to / repo
! [remote rejected] dev - > master(缺少必要的对象)
错误:未能将一些文件推送到'ssh://user@domain.com:2222 / path / to / repo'

我不确定这里发生了什么。

解决方案

<如 git存储库未能遍历父错误中所述,这也可能是由浅层克隆引起的。

在你的情况下(测试回购),从头开始是最容易的。



一般来说,您在 this thread


1。使用 git rev-list --objects 来找出 40aaeb204dc 是什么。



如果这样做不起作用:

2。运行 git fsck --full ,并保持原封不动。这需要一段时间。

结果将包括缺失对象的列表(如 40aaeb204dc ),最重要的是它们的类型。 p>

howto / recover-corrupted-blob-object.txt 可用于识别损坏的松散对象。



I'm attempting to deploy my local repo to a remote directory. I've run git init --bare in this remote directory, and added the correct ssh path to my local git repo branch (named dev) with git remote add server ssh://user@domain.com:2222/path/to/repo.

When I run git push server dev I get the following output:

Counting objects: 44, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (37/37), done.
Writing objects: 100% (44/44), 89.58 KiB, done.
Total 44 (delta 2), reused 27 (delta 2)
error: Could not read 551dd5c5d67e3b2da4074d8f15a59a324a063a03
fatal: Failed to traverse parents of commit 0615b940c3247e3547de1379ab09a4a6bb614252
error: Could not read 551dd5c5d67e3b2da4074d8f15a59a324a063a03
fatal: Failed to traverse parents of commit 0615b940c3247e3547de1379ab09a4a6bb614252
To ssh://user@domain.com:2222/path/to/repo
 ! [remote rejected] dev -> master (missing necessary objects)
error: failed to push some refs to 'ssh://user@domain.com:2222/path/to/repo'

I'm not sure what is going on here.

解决方案

As mentioned in "git repository failed to traverse parent error", this can also be caused by a shallow clone.

In your case though (testing repo), restarting from scratch is the easiest.

In general, you have interesting advices in this thread:

1. Use "git rev-list --objects" to find out what 40aaeb204dc was.

And if that doesn't work:

2. Run "git fsck --full", with packs intact. This will take a while.
The result would include a list of missing objects (like 40aaeb204dc), and, most importantly, their type.

Following howto/recover-corrupted-blob-object.txt would be useful for identifying a corrupt loose object.

这篇关于为什么我的git推送到HostGator共享主机失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆