git commit in Powershell build step fails - permission error
As the last step in the build I would like to commit a modified ReleaseNotes.txt back to the git repo. This Fails with the following log
[15:00:28]Step 4/4: Commit updated ReleaseNotes.txt to repo (PowerShell)
[15:00:28][Step 4/4] PowerShell Executable: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
[15:00:28][Step 4/4] Working directory: C:\BuildAgent\work\cb902fa40f4b8939\GIVSTP_Test
[15:00:28][Step 4/4] Command: C:\Windows\sysnative\WindowsPowerShell\v1.0\powershell.exe
[15:00:28][Step 4/4] PowerShell arguments: -NoProfile, -NonInteractive, -ExecutionPolicy, ByPass, -File, C:\BuildAgent\temp\buildTmp\powershell2236852860911148043.ps1
[15:00:29][Step 4/4] On branch master
[15:00:29][Step 4/4] Your branch is up-to-date with 'origin/master'.
[15:00:29][Step 4/4]
[15:00:29][Step 4/4] Changes not staged for commit:
[15:00:29][Step 4/4] modified: ReleaseNotes.txt
[15:00:29][Step 4/4]
[15:00:29][Step 4/4] no changes added to commit
[15:00:29][Step 4/4] Everything up-to-date
[15:00:29][Step 4/4] Process exited with code 0
The problem with the "Changes not staged for commit" seems to be related to some weird permission settings in the .git folder in
the working directory of the build.
When I try to execute the respective row from the build step on the agent in Powershell
git commit -m "Version info update during release build"
I get the following error back
fatal: could not open '.git/COMMIT_EDITMSG': Permission denied
The agent is a Windows Server 2012
Please sign in to leave a comment.
Can be removed the error was in the git command I used