[英]git error `fatal: failed to read object` when pushing from a repo on Dropbox on a new machine
I have a repository on my old computer stored on Dropbox.我的旧电脑上有一个存储库,存储在 Dropbox 上。 I recently bought a new computer (which I currently don't have access to), downloaded Dropbox, synced the repository folder from Dropbox, and tried to make changes and push them to the repository.我最近买了一台新电脑(我目前无权访问),下载了 Dropbox,从 Dropbox 同步了存储库文件夹,并尝试进行更改并将它们推送到存储库。 However, I receive the error:但是,我收到错误:
fatal: failed to read object 21519a1bca9bbabb1c3185336a974cedca25b0dc: Input/output error
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
error: failed to push some refs to 'https://github.com/user/my-repo.git'
(where I have changed the actual username/repo name). (我已经更改了实际的用户名/仓库名称)。
There are some other questions about these failures, but nothing I could find as simple as my situation.关于这些失败还有其他一些问题,但我找不到像我的情况这么简单的问题。 Using git with Dropbox is sometimes cautioned, but this seems to be unexpected behaviour as far as I can tell.有时会警告将 git 与 Dropbox 一起使用,但据我所知,这似乎是意外行为。
I've tried searching for the objects referred to but I can't find them in the stream of other objects in .git/objects
.我尝试搜索引用的对象,但在.git/objects
的其他对象的 stream 中找不到它们。
I answered my own question using the answer here: fatal: failed to read object X Input/output error fatal: index-pack failed - Git pull with Dropbox我使用此处的答案回答了我自己的问题: 致命:无法读取 object X 输入/输出错误致命:索引包失败 - Git 使用 Dropbox 拉取
Even though I thought my whole repository had been synced locally, going into the .git
file showed that only some folders had been synced locally by 'Smart sync'.尽管我认为我的整个存储库已在本地同步,但进入.git
文件显示只有一些文件夹已通过“智能同步”在本地同步。 Right-clicking and choosing Smart sync -> local
for each folder not locally synced fixed the issue.右键单击并为未在本地同步的每个文件夹选择Smart sync -> local
解决了该问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.