-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git repository is owned by someone else #6683
Comments
This appears to be new Git behavior in 2.35.2: https://github.blog/2022-04-12-git-security-vulnerability-announced/ The file should exist though. Could you try reloading the VS Code window and check if a new file (with a different random id) is created? |
git --version
No such file exists no matter how many times I reload |
Is the Please also append the full log from after a window reload. |
Yes. /workspaces. ubuntu (myself) though devcontainer is run as root, though this wasn't an issue in the past.
How to do this? |
Having the same issue here. Where can I find the full log trace so I can link it here ? |
You can show the current log with |
@chrmarti Here's my log, I'm running git
When running
|
@julian-poidevin You seem to be running on a Linux host or WSL, correct? It looks like Git doesn't like the fact that you are root in the container and the files are owned by the local user's UID:GID. When you add a regular user to the container (in the Dockerfile) and specify that as the "remoteUser" in the devcontainer.json the extension will attempt to update the container user's UID:GID to those of the local user (this only works when these UID:GID are not already used in the container). |
Yes I'm under ArchLinux. Your recommandations fixed my issue. I added support for the Thanks a lot ! @vishalovercome I suggest you try the same. |
@chrmarti Getting back to you on this issue. For some reasons, I need to connect to the container as |
Adding the workspace as a "safe.directory" as Git suggests might help. Or you could use |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
I'm facing the same issue: I'm trying to develop my application inside a custom container. My host OS is Ubuntu 20.04, with VS Code 1.68. The container is based on Ubuntu 20.04. The default user inside the container is root (which seems to be the default choice for many containers these days), while the user which runs VS Code on the host is another one. After starting the container, any
Adding the suggested exception fixes the problem, so I tried to automate this step by adding the
This fixes problem, as expected, but breaks another thing: now After some investigation, I discovered that VS Code copies the global
while if I add the
By exploring the container log I found that my custom command is executed before the copy of the
Any help? |
Hi @amasciotta, I had similar issues. What did the trick for me was : add this line to "remoteUser": "vscode", Same as you, I added the following "postCreateCommand": "git config --global --add safe.directory /workspaces/repo" Finally, I had to setup my git information locally (outside of the container) by running : $ git config user.name "John Doe"
$ git config user.email [email protected]. Make sure to avoid putting the |
Steps to Reproduce:
Output
fatal: unsafe repository ('/workspaces' is owned by someone else)
To add an exception for this directory, call:
Adding this line seems to fix Source Control & Github extensions. But I never had to do this before. Additionally, I can see this in my .gitconfig file inside container:
[credential]
helper = "!f() { /root/.vscode-server/bin/dfd34e8260c270da74b5c2d86d61aee4b6d56977/node /tmp/vscode-remote-containers-731ca5ddc2028f730f3ae2e2799ae3dad0fb6ee0.js $*; }; f"
/tmp/vscode-remote-containers-731ca5ddc2028f730f3ae2e2799ae3dad0fb6ee0.js
doesn't exist however.The text was updated successfully, but these errors were encountered: