hyg_123
hyg_123
采纳率33.3%
2016-12-29 06:47

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

        不知道什么原因,求大神解决
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

3条回答

  • charlie818 Charlie818 5年前

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

    点赞 1 评论 复制链接分享
  • programmer54 岐伯漫谈 4年前

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

    点赞 评论 复制链接分享
  • hyg_123 hyg_123 5年前

    上面问题已解决:现在执行 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'
    求大神解答

    点赞 评论 复制链接分享

相关推荐