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.
Separate names with a comma.
Discussion in 'Package Manager' started by Deleted User, 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.
This issue seems to be fixed in the Unity Hub 2.2.2!
Thanks to the Unity team, thank you!
I am on Unity Hub 2.2.2 and I am definitely still having this issue.
My PATH includes both C:\Program Files\Git and C:\Program Files\Git\cmd and I have restarted both Unity Hub and Unity Engine a few times since adding them. Is there anything I may have missed?
If any one facing the issue even after installing Git, adding in env path, try restarting the PC.
It worked for me.
Hi I'm still having this error, with version 2019.3.0f6 and its not related to Hub because I deinstalled it and run unity as admin
Also its possible to find git in the console, and my PATH is C:\Program Files\Git\cmd and C:\Program Files\Git LFS
And my version is git version 2.26.2.windows.1
C:\Program Files\Git LFS
git version 2.26.2.windows.1
This looks like a misconfigured Git installation.
Searching for "git remote-https is not a git command" on Google reveals a lot of troubleshooting resources that could help you. We cannot help you further than that, I'm afraid.
For those who've followed the directions above but are still having trouble. If you are using Windows, please check the PATH variable in system environment and make sure that the path points to the git executable.
I thought my PATH variable was set because I was checking it in my unix terminal (i don't like using cmd). Check the PATH using cmd and see if it's set there!
I am really dumb, and don't know how to set a "path" any chance you fellows could give me some help.
This video helped me a lot. Hope this will solve your problem.
FIXED! I had the same issue and this video helped me too! Thank you!
For anyone else with the issue, just remember: once you follow the steps of the video, right-click the Unity Hub taskbar icon and choose 'Quit Unity Hub' from there, then try again (simply closing and re-opening the app won't work).
I had to restart my pc after installing Git for it to work and ask me for my git credentials.
Thanks! Closing the UnityHub by clicking the close button doesn't actually close it! What a tricky cause!
Would it be possible in future releases to optionally install git and any other dependency, like for example the visual studio is installed or the Android libraries.
**Update** This issue is resolved
So I had some extra spaces that needed to be deleted after I pasted the URL in Package Manager I'll just leave this here in case anyone else runs into the same issue. Lol
Hey all, I've tried the steps from above and now I'm getting a different error:
Cannot perform upm operation: Unable to add package [https://github.com/De-Panther/unity-webxr-export.git?path=/Packages/webxr ]:
Cannot checkout repository [https://github.com/De-Panther/unity-webxr-export.git] on target path [Packages/webxr ]:
Error when executing git command. error: pathspec 'Packages/webxr ' did not match any file(s) known to git
I'm using Windows 10 Home 64-bit
Any suggestions for this?
Still broken in 2020.3.x
I haven't tried rebooting yet (rebooting? Seriously? Just to get the Hub to stop being broken?). I'm guessing the bug here is that "quitting" the Hub doesn't actually quit it. But it's embarassing that the Hub is so awful: Windows doesn't even need you to close and re-open the windows, path updates are instantaneous everywhere else ... except Unity.
Strongly disagree with that. As long as I've been using Windows, it's always the same: sooner or later you'll have to go and edit environment variables manually. Because it's Windows being Windows.
But yes, as for fixing this problem, I can confirm that adding variable to the path solved it for us as well. See the video above!
Uh, yes ... but updating those variables immediately updates them for all apps - including all Microsoft ones.
Unity ... requires a multiple-minutes-long restart.
after installing git and restarting unity hub and other instanaces,
when pressing where git or git, i get the expected results.
but i still get the error trying to add a git package
This discussion was very helpful. After installing git I hadn't realized that the previous unity git failures left both hub and editor zombie processes. Opening the task manager, killing the hub processes and then the editor zombies then reopening hubs/editor fixed this issue for me. (yes, cmd could execute git)
I think some of the problems people have had with this is a result of poor messaging about what Unity Hub is.
Unity Hub is a license manager utility like Adobe Creative Cloud or Google Drive, which stays open all the time regardless of whether the application window is open, but users (especially users who don't have a pro license, which is to say the vast majority of users) don't at all view it like that. Users view it like a simple launcher application, whose job is finished when the Editor finishes loading. So, when a user is told to "restart Unity Hub," what they hear is "close and re-open the Unity Hub application window," even though that doesn't do anything since the Unity Hub process stays running the entire time.
It might be better to say something like "close Unity Hub using the icon in the notification area" or something. That's a little verbose, and users should be able to figure that out for themselves, but the root of the issue seems to be that Unity Hub is generally poorly explained to them.
That's just not true.
Unity had a licensing manager. And they had the UnityEditor.
Then someone at Unity decided to create the Hub. If the Hub were merely a license manager utility then everything would still work how it used to. Instead the Hub has been (ab)used by Unity staff to try and force a bunch of unrelated features in (e.g. core functionality was *deleted* from the Editor and recreated - badly, brokenly - in the Hub. Cynically: because so many people hated the Hub (a poor quality, poorly designed, unnecessary, piece of bloatware) that uptake was slow - so they made it impossible to not use it).
This was literally the one very small step I was missing. I assumed that simply closing the app regularly would reset it. I didnt know it was a "still running in the background" application. Thanks SO much
I've had the issue, the doc said that I needed to install git lfs that the message does not mention, I did and it did not work. Then I clicked on the message it said below that I needed to restart Unity and Unity Hub, which I did and it did not work. Finally I rebooted the computer and it worked.
Now I realize that the solution was in this thread but I did not notice it at first glance...
Hi man thanks a lot you save my day
I am reading this page for about 3 hours now and i am used the current beta version of the hub and i downgraded it and its working now
Yep it also worked for me, this is the fix, thank you
Wanted to chime in to +1 @danUnity's comment. On our small team, restarting Unity and Unity Hub after following the instructions above was sufficient, but one person did have to do a full reboot of his machine for the changes to take effect.
Look in Task Manager under Background Processes. Even after closing Unity Hub from the taskbar I still had about 10 Unity Hub processes active. Right-click on each and select 'end task'. One of them will be the uber-process and the rest will probably die along with it. It works fine after doing this - basically what a restart does.
Got the error in Unity 2021.3.16: No 'git' executable was found. Please install Git on your system then restart Unity and Unity Hub [NotFound]
On Windows solved the problem doing this:
Installing Git (During the instalation, tick on "Add a Git Bash Profile to Windows Terminal)
Closed all the Unity instances and Github (it's important to close it also in the Windows taskbar)
For me also restarting the PC after GIT Install was necessarry to solve.
Thanks, this helped