简体   繁体   English

SSH储存库中的Git Clone

[英]Git Clone from SSH Repository

I used to be able to clone from my personal git repository but now i seem to be running into an error. 我曾经能够从个人git存储库中进行克隆,但是现在我似乎遇到了错误。

user:dev.site.com mikesilvis$ git clone { my ssh directory }
server@ipaddress's password: 

remote: Counting objects: 3622, done.
remote: Compressing objects: 100% (2718/2718), done.
error: git upload-pack: git-pack-objects died with error.  
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed

It seems to be working however while I push files to the repository. 但是,当我将文件推送到存储库时,它似乎正在工作。

I ended up just making a new remote repository on the server and re pushing all of my local information to it. 我最终只是在服务器上建立了一个新的远程存储库,然后将所有本地信息推送到该存储库。

still have not found an answer to my problem though. 仍然没有找到我的问题的答案。

If push is working, you can try to imitate that GitHub issue and do a: 如果推送有效,则可以尝试模仿GitHub问题并执行以下操作:

git push origin --all

, and see if that solves the cloning problem. ,看看是否能解决克隆问题。

Not an answer to fix git clone, however, if you need those files cloned you can save a local copy of the repository and clone from that. 但是,这不是修复git clone的答案,如果您需要克隆这些文件,则可以保存存储库的本地副本并从中进行克隆。

eg I have myrepo.git on a user git and when I git clone git@localhost:myrepo.git I get that error 例如,我在用户git上有myrepo.git,当我git clone git @ localhost:myrepo.git时,出现该错误

cp /home/git/repositories/myrepo.git ~
git clone ~/myrepo.git
rm -rf ~/myrepo.git

and you should have a myrepo folder with the files you need 并且您应该有一个myrepo文件夹,其中包含您需要的文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM