I get this error when I add git repo to packages. Unity 2019.3.0a11. How can I solve this?
I think this post could help you:
https://discussions.unity.com/t/719263
Please take a look at the Requirements
section.
Git is in my PATH variable. When I write âgitâ in PowerShell, it brings up git manual.
Could you check where exactly is your git installed? Are you using a custom distribution of git?
I have Git for Windows. I have installed it in âC:\Program Files\Gitâ directory. âC:\Program Files\Git\binâ has been added to my PATH variables.
Could you try having C:\Program Files\Git\cmd
in your path instead of C:\Program Files\Git\bin
and see if it works?
I changed the path variable to point to C:\Program Files\Git\cmd
but it doesnât work. Writing git in powershell still works.
When I write âgit --versionâ in powershell, I get this:
git version 2.21.0.windows.1
Is the version ok?
I donât know if itâs useful to file a bug report since it happens in a literally empty project.
These are the steps that I do:
1- Create a new project (Unity 2019.3.0a11)
2- Open pacakge manager window
3- Click on the plus button and choose âAdd package from git urlâ
4- Enter âGitHub - omid3098/OpenTerminal: Open Terminal for Unity3D. execute your commands in runtime!â and press âAddâ
And this error is printed in the console:
Error
Cannot perform upm operation: Unable to add package [GitHub - omid3098/OpenTerminal: Open Terminal for Unity3D. execute your commands in runtime!]:
No âgitâ executable was found. Please install Git on your system and restart Unity [NotFound]
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Hi @ ,
We would really like to get to the bottom of this!
Could you try running the following in cmd.exe and not in PowerShell:
where git
This is the result of running âwhere gitâ in cmd (I opened non-administrator cmd):
âC:\Program Files\Git\cmd\git.exeâ
Same problem happens to me. Is there any update on how to solve this?
@ There appears to be an issue with the way we look for git in your PATH. To help us debug the issue, would you mind sharing your PATH value by running the following command in cmd:
echo %PATH%
Please feel free to anonymize any personal information like your username. Thank you!
Edit: If you prefer, you can send this in a direct message by clicking my username and then âStart conversationâ
Hi @grogshotgames ,
Can you make sure that youâve quit and restarted Unity as well as Unity Hub since making any changes to your PATH? This is important because Unity Hub will pass the environment it was started with on to the Unity editor. Is it possible you started Unity Hub before making the changes to your PATH?
Restarting Unity Hub solved my issue.
Thanks!
Great! We are going to update the âPlease install Git on your system and restart Unityâ message to include Unity Hub
Hello,
Iâm here for the same problem and Iâm still struggling to make it work properly.
In my case, I have a project with a git dependency in the manifest.json file using the git:// scheme:
{
"dependencies": {
...
"com.e7.notch-solution": "git://github.com/5argon/NotchSolution.git#5ce344a771045c0dae52205e7be49bdda79bbc96"
}
}
Each time I try to open the project with Unity 2018.3.14f1 (Unity Hub 2.2.1) I get this error message:
Iâve tried a lot of things, including an installation of Git in a custom folder. It appears in the PATH, I can use the git command from the Windows command line (cmd.exe) and where git give me this:
Iâve restarted the Hub multiple times and even reboot my computer but I still have this error.
Iâve also tried with Unity 2019.3.0f1, itâs the same issue.
The only thing that make it work is to launch the editor from the Editor folder directly, not from the Unity Hub, but I donât really know why and how to fix itâŚ
Do you have any idea?
Iâve ran into this problem as well.
Windows 10 Pro 64-bit
Unity Hub 2.2.1
git version 2.24.0.windows.2 (64-bit)
Unity 2019.2.15f1
System-level PATH includes âC:\Program Files\Git\cmdâ at the very beginning.
âwhere gitâ in cmd.exe returns âC:\Program Files\Git\cmd\git.exeâ
Steps:
- Create an empty project using the â3Dâ template (the template used probably does not matter though). Unity opens this project without errors.
- Close Unity.
- Modify the projectâs manifest.json to include
"com.unity.2d.tilemap.extras": "https://github.com/Unity-Technologies/2d-extras.git#master",
- Open the project again. The âNo âgitâ executable was foundâ error is displayed.
Tested Versions:
- Unity 2019.2.15f1
- Unity 2019.2.9f1
- Unity 2019.1.12f1
Attempted Solutions:
- Restarted Unity and Unity Hub.
- Restarted Windows.
- Installed the latest version of Git for Windows: 2.24.0 (64-bit)
- Cleared the projectâs Library and Temp directories.
- Moved the directory from in the middle of the PATH variable to the beginning.
- Reinstalled Unity Hub.
This just started happening, after installing the new version of Unity Hub and Unity 2019.2.15f1. This problem also happens on other projects which were working fine up until now.
HI there,
There is a known issue related to environment variables with the latest version of Hub. The issue will be fixed in the next release (ETA next week or so).
For now, it looks like launching the editor from the Editor folder directly might be the best work-around. (thanks @Noxalus ).
Best,
Ethan
Unfortunately, when I try to open Unity.exe from the Unity\Hub\Editor folder, it just opens Unity Hub. There is a version of the editor in Unity\Editor which works, but itâs version 2018.2 and I need 2019.2. I am currently downloading the Unity 2019.2.15f1 installer from the download archive to see if that version will work without Unity Hub.
Edit: If you uninstall Unity Hub, you can run the Unity editor from Unity\Hub\Editor. Posting this in case it helps anyone else.
Sorry for not saying this earlier; thank you for the response Ethan Itâs good to know that a solution is coming soon.
Had the same problem, but if set âLoad Previous Project On Startupâ, it does not open the the hub. That workaround of course only makes sense if you have just one main repo youâre working on.
This issue seems to be fixed in the Unity Hub 2.2.2!
Thanks to the Unity team, thank you!