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

Sporadically starts detecting "dubious ownership" #8488

Closed
pamelafox opened this issue May 10, 2023 · 6 comments
Closed

Sporadically starts detecting "dubious ownership" #8488

pamelafox opened this issue May 10, 2023 · 6 comments
Assignees
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster

Comments

@pamelafox
Copy link
Member

Type: Bug

When I am working inside a project and run a git command, it will ocasionally error out with:

vscode ➜ /workspace $ git status
fatal: detected dubious ownership in repository at '/workspace'
To add an exception for this directory, call:

        git config --global --add safe.directory /workspace

When that happens, I either run the suggested command, restart the dev container, or use git outside the terminal.

I am typically inside a Dev Container, or at least, I was inside one when this happened most recently.

I don't think I did anything between my most recent successful git command and this error, so I'm not sure why it starts detecting dubious ownership.

VS Code version: Code - Insiders 1.78.0-insider (Universal) (657bb89984f37b810b250955570593cde0cd62eb, 2023-05-02T11:25:59.772Z)
OS version: Darwin arm64 22.4.0
Modes:
Sandboxed: Yes
Remote OS version: Linux x64 5.15.49-linuxkit

System Info
Item Value
CPUs Apple M1 Pro (10 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 10, 9, 9
Memory (System) 16.00GB (0.07GB free)
Process Argv --crash-reporter-id 29b0fda8-7569-499a-9770-cfbb5ac8c0cf
Screen Reader no
VM 0%
Item Value
Remote Dev Container: flask-db-quiz
OS Linux x64 5.15.49-linuxkit
CPUs unknown (5 x 0)
Memory (System) 8.74GB (4.22GB free)
VM 0%
Extensions (16)
Extension Author (truncated) Version
vscode-azurevirtualmachines ms- 0.6.4
jupyter-keymap ms- 1.1.0
remote-containers ms- 0.293.0
ruff cha 2023.14.0
vscode-eslint dba 2.4.0
copilot-chat Git 0.1.2023051001
copilot-nightly Git 1.86.86
vscode-github-actions git 0.25.7
vscode-bicep ms- 0.17.1
vscode-dotnet-runtime ms- 1.6.0
black-formatter ms- 2023.2.0
python ms- 2023.8.0
vscode-pylance ms- 2023.5.10
sqltools mtx 0.27.1
sqltools-driver-pg mtx 0.5.1
pypi-assistant twi 1.1.3
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30404738
cppdebug:30492333
vsclangdf:30492506
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30618038
pylantcb52:30590116
pyind779:30611226
pythonsymbol12:30651887
a9j8j154:30646983
6233i204:30725950
azdwalk:30721579
pythonms35:30671666
0bg3d529:30680467
ecj1e332:30687743
pythonfmttext:30716741
pythoncmvfstr:30726892
fixhidewlkth:30724384
hidesbindicator:30724476
pythongtdpath:30726887

@pamelafox
Copy link
Member Author

Fuller log:

vscode ➜ /workspace (prepare) $ git push
Enumerating objects: 361, done.
Counting objects: 100% (361/361), done.
Delta compression using up to 5 threads
Compressing objects: 100% (303/303), done.
Writing objects: 100% (361/361), 95.77 KiB | 422.00 KiB/s, done.
Total 361 (delta 152), reused 77 (delta 31), pack-reused 0
remote: Resolving deltas: 100% (152/152), done.
remote: 
remote: Create a pull request for 'prepare' on GitHub by visiting:
remote:      https://github.com/pamelafox/flask-db-quiz-example/pull/new/prepare
remote: 
To github.com:pamelafox/flask-db-quiz-example.git
 * [new branch]      prepare -> prepare
branch 'prepare' set up to track 'origin/prepare'.
vscode ➜ /workspace (prepare) $ git status
On branch prepare
Your branch is up to date with 'origin/prepare'.

nothing to commit, working tree clean
vscode ➜ /workspace (prepare) $ git status
fatal: detected dubious ownership in repository at '/workspace'
To add an exception for this directory, call:

        git config --global --add safe.directory /workspace

@lszomoru
Copy link
Member

Assigning to @chrmarti as this is specific to dev containers.

@chrmarti
Copy link
Contributor

@pamelafox Do you have detailed steps to reproduce?

@chrmarti chrmarti transferred this issue from microsoft/vscode May 16, 2023
@chrmarti chrmarti added info-needed Issue requires more information from poster containers Issue in vscode-remote containers labels May 16, 2023
@pamelafox
Copy link
Member Author

I'm afraid I don't have reliable steps for reproduction, since it isn't consistent - happens every few weeks, perhaps. If I run into it again, are there particular logs that would help in figuring out its cause?

@chrmarti
Copy link
Contributor

I assume this is with Docker Compose. This is tracked in #7923. Thanks.

@pamelafox
Copy link
Member Author

Ah, yes, that repo does use docker-compose. Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Jul 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants