简体   繁体   English

git 在新机器上从 Dropbox 上的仓库推送时出现错误“致命:读取对象失败”

[英]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.

相关问题 致命:无法读取 object X 输入/输出错误致命:索引包失败 - Git 使用 Dropbox 拉取 - fatal: failed to read object X Input/output error fatal: index-pack failed - Git pull with Dropbox 推送到Bitbucket存储库时出现“致命:身份验证失败”错误 - “Fatal: authentication failed” error when pushing to bitbucket repo Git错误:推送到裸仓库时远程解包失败 - Git error: remote unpack failed when pushing to a bare repo GIT 致命:无法读取对象 - GIT fatal: failed to read object Heroku - 推送到git存储库时出现致命错误 - Heroku - Fatal error when pushing to a git repository 将项目推送到现有repo-> Permission denied(publickey)时出错 - 致命:无法从远程存储库读取 - Error pushing project to existing repo-> Permission denied (publickey) - fatal: Could not read from remote repository 致命:推送到远程仓库时对象已损坏 - Getting fatal: object is corrupted when pushing to a remote repo 推送到新Git仓库的问题 - Issues with Pushing to new Git repo 错误:未能推送一些参考 | 推送本地 git repo - error: failed to push some refs | pushing local git repo 在 Colab 中将文件推送到 Git 时出错:致命:无法读取“https://github.com”的用户名:没有这样的设备或地址 - error when pushing files to Git in Colab: fatal: could not read Username for 'https://github.com': No such device or address
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM