I am trying to push a test file during a ci build on vsts. However, it seems that the commit command does not work.
Asked
Active
Viewed 285 times
-1
-
The screen capture you show doesn't seem to sync up very well with the commands in your script. I don't see anything wrong with what you did, so an error message is the only thing which might tip us off as to what the problem is. – Tim Biegeleisen Aug 17 '18 at 14:01
-
1You haven't configured git in that repo yet. So you can't commit namelessly. – tehhowch Aug 17 '18 at 14:05
-
@TimBiegeleisen I just re-ran the build and made sure the task is saved.Same result, such error is out of the question now... – Igor Aug 17 '18 at 14:09
-
@tehhowch you are right I have set the following: git config --global user.email "you@example.com" git config --global user.name "Your Name" And it worked If you will provide an answer, I will accept it. – Igor Aug 17 '18 at 14:17
-
All I did was read the error message, which you were supposed to do ;) – tehhowch Aug 17 '18 at 14:40
-
@tehhowch I assumed that if I can pull and push without a name configured. Why shouldn't commit work. Assumption is the mother of all ... – Igor Aug 17 '18 at 20:53
-
@Igor there's a big difference between loading the work of others and creating work – tehhowch Aug 17 '18 at 21:29
1 Answers
1
As @tehhowch commented below the question. It is impossible to commit without your username/name configured for the local git configuration.
It can be solved as shown in the error message =), by using:
git config --global user.email "you@example.com"
git config --global user.name

Igor
- 323
- 2
- 13