-1

I create new user and give chmod, but is still cannt push to server
also i create .ssh file in server with kay , which is my public key
can i push to github and github kay link to my server or what to do?

USER@DESKTOP-3FAA4O5 MINGW64 ~/Documents/RestAPI/site-restapi/proj (master)
$ git push origin master
Enumerating objects: 41, done.
Counting objects: 100% (41/41), done.
Delta compression using up to 4 threads
Compressing objects: 100% (37/37), done.
Writing objects: 100% (41/41), 329.49 KiB | 3.02 MiB/s, done.
Total 41 (delta 12), reused 0 (delta 0), pack-reused 0
error: remote unpack failed: unable to create temporary object directory
To (amazon ec2 instance):/var/www/html/project/project.git
 ! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to '(amazon ec2 instance):/var/www/html/project/project.git'

1 Answers1

0

This message:

error: remote unpack failed: unable to create temporary object directory

indicates that something is wrong on the server, most likely a permissions issue. This is not fixable on your own machine. You must log in to the Amazon EC2 instance itself (perhaps with ssh) and fix the issue there. First, however, make sure that when you use git push to log in to the Amazon EC2 issue with ssh, you are logging in as the correct user: the same one you used to set up the repository in the first place. That user would normally have all the requisite permissions.

(To push successfully, the user executing the Git program over on the EC2 instance must have permission to create temporary object directories within the Git repository there. The files that your Git program on your machine sends, wind up in the temporary "quarantine" directory on the EC2 instance, where they sit until they are inspect and pass the quarantine inspection. Then they get migrated and/or integrated into the regular files, which also requires appropriate permissions. Once all objects are stored in the repository's objects/ directory, the Git program on the server will update the references in the repository's refs/ or packed-refs directory or file as appropriate, then delete the quarantine directory.)

torek
  • 448,244
  • 59
  • 642
  • 775