gitgodebuggingdelve

error obtaining vcs status when running delve as root


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?!


Solution

  • 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