9

I am trying to run sudo dlv debug on Arch Linux and I keep getting following error:

error obtaining VCS status: exit status 128
    Use -buildvcs=false to disable VCS stamping.
exit status 1

When I remove the .git folder, sudo dlv debug runs as expected, so I assume it could be a configuration issue with git?!

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
doemsche
  • 892
  • 2
  • 12
  • 25

2 Answers2

15

I had a similar error message when debugging code opened in a remote container via vscode.

when I used git status I got a message saying the git repository is unsafe was owned by someone else. And then a message explaining to use:

git config --global --add safe.directory [your dir here]

doing this I no longer get the VCS stamping warning

Mesh
  • 6,262
  • 5
  • 34
  • 53
  • I have the same issue and this answer helped me to understand what is wrong with it, so I have set proper user access to the files. – Honarkhah Jul 28 '22 at 12:28
  • Same issue while building Terraform providers, this helped – Kushal Arya Oct 04 '22 at 09:13
  • Make sure the dir does not have symlinks in it. This works only with absolute paths. – u15p7fgy863eiq5 Oct 25 '22 at 23:06
  • This solved this error for me. But my case was different. I had set the container USER to "app", but my volume mount was set to "root". So I guess Git didn't trust because the owner of the directory was different from the current login user. – b01 Apr 05 '23 at 03:38
0

For those coming from Google, you probably don't have the permissions to a folder. chmod user:user folder and add -R to propagate it in subfolders.

AirOne
  • 226
  • 1
  • 2
  • 14