git push 过程中执行git commit -m “”时报错

服务器搭建好了,测试git clone 没问题。
当测试git push 时出现问题:
第一步:mkdir work
第二步:进入目录执行git init
第三步:git remote add origin gitServer:/home/git/project.cgi
第四步:创建文件test.txt,并执行git add test.txt
前四步都没问题,
第五步:执行git commit -m “add a test.txt”时报如下错误:

        *** Please tell me who you are.

Run

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for ) not allowed

        不知道什么原因,求大神解决

用git的话必须先创建一个用户,即用邮箱去注册,就是git config所指的。刚入门的话最好去看看廖雪峰的git教程

上面问题已解决:现在执行 git push origin master出错
hyg@u-server:~/workspace$ git push origin master
hyg@gitserver's password:
Counting objects: 11, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (11/11), 916 bytes | 0 bytes/s, done.
Total 11 (delta 1), 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 gitServer:/home/git/hello.git
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'gitServer:/home/git/hello.git'
求大神解答

权限不够 chown -R git:git sample.git