Here is the fault print:
Counting objects: 3, done.
Writing objects: 100% (3/3), 214 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: error: insufficient permission for adding an object to repository database objects
remote: fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
To git@192.168.1.102:/home/git/test.git
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'git@192.168.1.102:/home/git/test.git'
The reason is that the git repo doesn’t have the authority.Input the ls -alh to check the owner of the git repo(mine is test.git):
ls -alh test.git
and see that the owner and group owner is root ,change to current user git:
sudo chown -R git:git git_repo(test.git)