26

When I opened xcode and tried to make a macosx app, this weird message came up.

Is this a glitch or a virus, as Apple wouldn't say something like this. It does not look like a system message.

this is weird

  • 13
    It's not a virus. It's a standard error message from the git software. – jksoegaard Aug 19 '16 at 13:49
  • 28
    Obligatory link (xkcd). – Boris the Spider Aug 19 '16 at 14:37
  • 8
    the "please tell me who you are" seems a bit personal for xcode so i can understand his skepticism – john cs Aug 19 '16 at 17:56
  • 1
    @jksoegaard I agree with john cs - this is about the opposite of a typical error message that I would expect. Software systems that try to be too familiar with users are inevitably bound to raise eyebrows. – Chris Cirefice Aug 20 '16 at 2:37
  • @ChrisCirefice I don't oppose to you agreeing with john cs. It is just a matter of fact that it is a standard error message from the git software. It's not a virus. – jksoegaard Aug 20 '16 at 13:15
38

No, this isn't a virus1.

It seems that your name and email address are not set up properly in Git. Go to Xcode Preferences and then Accounts, select the repository, and check the username.

You can also do this via the command line:

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

1: The message content can be found in /Library/Developer/CommandLineTools/usr/libexec/git-core/git (git version 2.7.4 (Apple Git-66) lines 11416-11424).

  • 12
    The OP might want to use --global. Could be worth briefly describing the difference. – Boris the Spider Aug 19 '16 at 14:38
  • 1
    You should usually use --global as --local applies only to the git repo you are currently in. – Michael Hampton Aug 19 '16 at 22:27
  • 1
    Your answer just repeats the same information that was in that popup box without really answering his question. – Johnny Aug 20 '16 at 4:31
  • 1
    OP's question was, "is <message> a virus?" The first line of the reply says "no, this isn't a virus". How does this not answer the question? (Though it may be worth expanding the answer and mentioning the difference between --global and --local, as said above.) – Léo Lam Aug 20 '16 at 9:53
  • 1
    @LéoLam - Check the edit, it didn't say that before rany's edit. Though more than a one-line answer might be nice, instead of "no, this isn't a virus", a little explanation about why Xcode needs git to be set up before you build a project would make it a better answer. – Johnny Aug 20 '16 at 13:37
0

Although the correct answer has been given above, that the message is by no means a virus, a more general explanation is due:

Xcode is a git client. It maintains git repositories for its projects, is able to create and manage them, and provides nice UI for many day-to-day git tasks.

Usually, when you setup Xcode, you create one or more "accounts" within Xcode, used to identify you against the App-Store and other entities, so that Xcode can save you lots of tedious mucking about setting up trusts, certificates, etc. when developing for iOS and Mac.

When you do that --- Xcode will also auto-config git for you, automatically creating the .gitconfig file, with Name, e-mail and the rest.

However, if you refrain from creating an initial account, and create a Mac project right away - your git setup is incomplete, and git itself will produce the dialog depicted in the question.

You can either simply configure .git as usual, providing it the basic info it needs, OR go back and add an Xcode account (in Xcode preferences) and let Xcode complete the git settings for you.

0

If git config --global user.email/name does not help, check your Xcode preferences:

enter image description here

-1

When you are done configuring git with

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

you can type git config --list to check the content:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .