Git: “please tell me who you are” error

前端 未结 21 1455
傲寒
傲寒 2020-11-30 16:21

I have app servers that I bootstrap together using Chef + some ad-hoc bash scripts. The problem is, when I want to run an update on one of these app servers, I get:

相关标签:
21条回答
  • 2020-11-30 16:45

    For me the issue was network connection, once I reconnected to my wifi, it could fetch the details and commit without any issues.

    0 讨论(0)
  • 2020-11-30 16:46

    Have a look at the config file.

    Repository > Repository Settings > Edit config file.

    Check if the [user] section exists. If the user section is missing, add it.

    Example:

    [user]
    name = "your name"
    email = "your email"
    
    0 讨论(0)
  • 2020-11-30 16:49

    Do I really need to set this for doing a simple git pull origin master every time I update an app server? Is there anyway to override this behavior so it doesn't error out when name and email are not set?

    It will ask just once and make sure that the rsa public key for this machine is added over your github account to which you are trying to commit or passing a pull request.

    More information on this can be found: Here

    0 讨论(0)
  • 2020-11-30 16:51

    You must Write Your email like that

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

    Then: Write Username

     git config --global user.name "Your Name"
    

    After That Poupup window will appear

    Write USERNAME & EMAIL For Acount YOU want contribute

    0 讨论(0)
  • 2020-11-30 16:51

    I use Jenkins and ran into this problem when trying to perform a release (which requires a git commit). To fix the issues, I needed to add a Custom user name/e-mail address (see picture) This ensured that when the code was checked out it used my build user's name/email address when performing the release. Note, this configuration is available from the Jenkins Multibranch Pipeline project configuration.

    0 讨论(0)
  • 2020-11-30 16:52

    It is unable to auto-detect email address.

    By default it takes your system username like abc@xyz.none.

    So you need to set your email like below:

    git config user.email "someone@gmail.com"
    

    After setting email you can run the git commands and commit your changes.

    1. git init
    2. git add *
    3. git commit -m "some init msg"
    0 讨论(0)
提交回复
热议问题