Skip to content
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

Workspace is not set as a safe directory #4

Open
argedistomb opened this issue Jan 31, 2024 · 1 comment
Open

Workspace is not set as a safe directory #4

argedistomb opened this issue Jan 31, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@argedistomb
Copy link

**Workspace is not set as a safe directory **
When initalizing container we get :

Running the postCreateCommand from devcontainer.json...

[24932 ms] Start: Run in container: /bin/sh -c bash /workspace/.devcontainer/scripts/post-create.sh
Runing post-create.sh
Adding git template remote
fatal: detected dubious ownership in repository at '/workspace'
To add an exception for this directory, call:

        git config --global --add safe.directory /workspace
fatal: detected dubious ownership in repository at '/workspace'
To add an exception for this directory, call:

        git config --global --add safe.directory /workspace
Running the postStartCommand from devcontainer.json...

To Reproduce
Steps to reproduce the behavior:

  1. Create repository based on this template
  2. Clone your repository
  3. Reopen in devcontainer

Expected behavior
Expected to trust workspace automatically.

Screenshots
image

Desktop (please complete the following information):

  • OS: debian11
@tomblancdev tomblancdev added the bug Something isn't working label Jan 31, 2024
@tomblancdev tomblancdev self-assigned this Jan 31, 2024
@tomblancdev
Copy link
Owner

Seems that git threw the error message detected dubious ownership in repository when you clone a repository with a different user than the one you used.

Here We are using root user by default.

So maybe simply consider /workspace as trusted by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants