error obtaining vcs status when running delve as root

Viewed 2433

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

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

Any help is much appreciated.

1 Answers

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

Related