I have an eSSD(external-SSD) where I store most of my unity projects because I have to access them on my desktop and latop for school. When ever I try to add a package using a git url I get the Cannot perform upm operation: Unable to add package [package]: Error when executing git command. fatal: not in a git directory error. This message also occurs when I add it manually to the manifest.json.
I do have git initialized an working because I am also storing my projects on git for version control which still works perfectly fine. For testing I cloned my project on one of my system drives and there upm had no problem installing the package. After which I recloned my project on my eSSD to make sure there was nothing corrupted, this also did not fix the problem.
I have stored my projects on an eSSD for years and never had any issues, so I opend up one of my older projects on my eSSD to check if they were still loading correcly, this was the case. So I switched from unity 2021.3.3f1 to 2019.4.39f1(which was the old project's version) to check if it was an version related issue. This was also not the case.
I also tried these solutions:
- Unity forum post about simmilar issue.
- Blog post about 'not a git directory'
So I don't know what is causing the issue at this point.