I tried to push to an aws ec2 instance using git but I always get this error :
error: pack-objects died of signal 13
error: failed to push some refs to ssh://ubuntu@..../..../myrepo.git
what i did:
1- create a git bare repository on my ec2 server (ubuntu 18.04)
mkdir myrepo.git
cd myrepo.git
git init --bare
2- in my local machine (ubuntu 16.04):
a- add myserverkey.pem in ~/.ssh/
b- add the following to .ssh/config
Host myserver
Hostname myserverpublicdns
User ubuntu
IdentityFile ~/.ssh/myserverkey.pem
c- in my project directory I did the following:
git init
git remote add origin myserver:/~/path/to/myrepo.git
git add .
git commit -m 'test commit'
git push origin master
also, I tried
git remote add origin ssh://ubuntu@myserverpublicdns/home/../path/to/myrepo.git
and it gives the same error when I push to the server
The error is :
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
and I couldn't find any solution for my case
Notice that my project size is only 4.5mb and I can connect to my server using :
ssh myserver
which means there are no mistakes in the .ssh/config file
So what is the problem ?? what I am doing wrong ??
Thanks in advance !!