【发布时间】:2019-03-28 06:17:55
【问题描述】:
我尝试使用 git 推送到 aws ec2 实例,但总是收到此错误:
error: pack-objects died of signal 13
error: failed to push some refs to ssh://ubuntu@..../..../myrepo.git
我做了什么:
1- 在我的 ec2 服务器(ubuntu 18.04)上创建一个 git 裸存储库
mkdir myrepo.git
cd myrepo.git
git init --bare
2- 在我的本地机器(ubuntu 16.04)中:
a- 在 ~/.ssh/ 中添加 myserverkey.pem
b- 将以下内容添加到 .ssh/config
Host myserver
Hostname myserverpublicdns
User ubuntu
IdentityFile ~/.ssh/myserverkey.pem
c- 在我的项目目录中,我做了以下操作:
git init
git remote add origin myserver:/~/path/to/myrepo.git
git add .
git commit -m 'test commit'
git push origin master
我也试过了
git remote add origin ssh://ubuntu@myserverpublicdns/home/../path/to/myrepo.git
当我推送到服务器时它给出了同样的错误
错误是:
Counting objects: 547, done.
Delta compression using up to 4 threads.
Compressing objects : 100% (530/530), done.
error: pack-objects died of signal 13
error: failed to push some refs to ssh://ubuntu@..../..../myrepo.git
我找不到任何适合我的案例的解决方案
请注意,我的项目大小只有 4.5mb,我可以使用以下方式连接到我的服务器:
ssh myserver
这意味着 .ssh/config 文件中没有错误
那么问题出在哪里??我做错了什么??
提前致谢!!
【问题讨论】:
标签: git amazon-web-services ubuntu amazon-ec2 git-bare