A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Package Manager' started by mnarimani, Aug 19, 2019.
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:
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 'https://github.com/omid3098/OpenTerminal.git' and press 'Add'
And this error is printed in the console:
Cannot perform upm operation: Unable to add package [https://github.com/omid3098/OpenTerminal.git]:
No 'git' executable was found. Please install Git on your system and restart Unity [NotFound]
git version 2.21.0.windows.1
We would really like to get to the bottom of this!
Could you try running the following in cmd.exe and not in PowerShell:
This is the result of running 'where git' in cmd (I opened non-administrator cmd):
Same problem happens to me. Is there any update on how to solve this?
@mnarimani 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:
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"
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.
Great! We are going to update the "Please install Git on your system and restart Unity" message to include Unity Hub
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:
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)
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"
Create an empty project using the "3D" template (the template used probably does not matter though). Unity opens this project without errors.
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.
Restarted Unity and Unity Hub.
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.
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).
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.