vscode git not working "folder currently does not have a git repository"

vscode: I cannot see anything in my git panel for vscode. vscode integration for git does not work. When I open up my old git directory on my data drive, it says:

the folder has no git and cannot initialize with vscode.

I have installed ubuntu many times now. Removed all ppa. Although it does work with a clean install of just vscode and git, when I install other items, git fails. These are standard repo items, android studio or mainstream browser debs.

from apt I installed:

sudo apt install vlc blender ardour calf-plugins calibre kate kdeconnect wine hugo sigil inkscape gimp synaptic caja okular kdenlive handbrake gparted caffeine gnome-shell-extensions gnome-tweaks

I also installed these debs googlechrome, vivaldi, vscode I also ran android-studio install setup I also have path setup for flutter but did not install with doctor yet.

git with vscode works with gdebi vscode and git installed. When I come back to my computer after the larger installs as stated above.. git does not work with vscode integration.

1 Answer

It is a root ownership issue from the new install of ubuntu. The previous Data drive where the git repos live are owned by the previous root user.

Try: git log This will show that the owner is not you, not only by git but the OS because it is a root, from the previous owner, even though it is you.

Verify this: Check the permission by right click in file browser (nautilus)

Verify this: Copy one of the repos to your local drive with you as the owner. Then check git with vscode again. It works.

Fix: Change permission on the whole Data drive or back up and copy back to the same drive..

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like