Unity не работает package manager

[Unity] Не работает Package Manager

Не отображаются ВСЕ пакеты, бесконечно отображается «Loading packages».

Версия юнити 2018.3.8f1.

Нет пинга к packages.unity.com (в консоле почему-то bintray.com) — в браузере просто белый лист (заходит на сайт https://bintray.com/).
Asset Store — работает. Unity с правами админа запускал. Пустой проект пробовал.

Неужели с таким никто не сталкивался?

2018.3.8f1 список пакетов отображается без проблем.

> Нет пинга к packages.unity.com (в консоле почему-то bintray.com) — в браузере просто белый лист
Тоже белый лист и не пингуется. Возможно, и не должен. Microsoft.com, например, никогда не пинговался.

Не белый лист:

список пакетов отображается без проблем.

Версия 2019.1.0f проблема сохраняется. Нашел способ как обойти — в файле manifest.json дописываем необходимый пакет (например «com.unity.probuilder»: «4.0.4») в «dependencies», перезапускаем юнити и пакет устанавливается автоматом.
Откуда взять название и версию? — отключаем интернет, заходим в «Package Manager» появляется весь список, запоминаем название (по крайней мере с probuilder прокатило) и версию.

Названия, версии да и сами пакеты можно получить тут: https://download.packages.unity.com/

alexzzzz
> Названия, версии да и сами пакеты можно получить тут:
> https://download.packages.unity.com/
спасибо за ссылку.

Вот сетевая статистика с момента открывания менеджера пакетов в 2019.1 до пропадания надписи «Loading packages».

Первые два адреса в списке — это туда по протоколу HTTPS обращается UnityPackageManager.exe. Остальное ― это UnityPackageManager.exe и Unity.exe общаются между собой.

Вместо 75.126.118.184 могут быть 108.168.194.93 или 75.126.208.206 ― это всё одно и то же. Ни один не пингуется.

Трассировка packages.unity.com (bintray.com, 75.126.118.184)

Трассировка маршрута к bintray.com [75.126.118.184]
с максимальным числом прыжков 30:

1 1 ms 1 ms 1 ms 192.168.1.1
2 8 ms 8 ms 8 ms 178.34.128.49
3 8 ms 8 ms 8 ms 178.34.129.235
4 60 ms 68 ms 60 ms 188.254.15.87
5 * * * Превышен интервал ожидания для запроса.
6 86 ms 88 ms 86 ms ae5.cbs02.tg01.lon01.networklayer.com [169.45.18.16]
7 80 ms 80 ms 83 ms ae8.cbs02.eq01.lon03.networklayer.com [169.45.19.44]
8 80 ms * 79 ms ae2.cbs02.eq01.ams02.networklayer.com [50.97.19.184]
9 78 ms 78 ms * ae7.cbs01.eq01.ams02.networklayer.com [50.97.17.248]
10 158 ms 159 ms * ae3.cbs02.eq01.wdc02.networklayer.com [50.97.17.242]
11 158 ms 156 ms * ae7.cbs01.eq01.wdc02.networklayer.com [50.97.17.142]
12 * * * Превышен интервал ожидания для запроса.
13 * 185 ms * ae0.cbs02.eq01.dal03.networklayer.com [50.97.17.162]
14 184 ms 202 ms 184 ms ae34.bbr02.eq01.dal03.networklayer.com [50.97.17.59]
15 183 ms 183 ms 183 ms ae5.dar02.dal05.networklayer.com [173.192.18.217]
16 186 ms 187 ms 186 ms po2.fcr04.sr03.dal05.networklayer.com [173.192.118.151]
17 * * * Превышен интервал ожидания для запроса.
18 * * * Превышен интервал ожидания для запроса.
19 * * * Превышен интервал ожидания для запроса.
20 * * * Превышен интервал ожидания для запроса.
21 * * * Превышен интервал ожидания для запроса.
22 * * * Превышен интервал ожидания для запроса.
23 * * * Превышен интервал ожидания для запроса.
24 * * * Превышен интервал ожидания для запроса.
25 * * * Превышен интервал ожидания для запроса.
26 * * * Превышен интервал ожидания для запроса.
27 * * * Превышен интервал ожидания для запроса.
28 * * * Превышен интервал ожидания для запроса.
29 * * * Превышен интервал ожидания для запроса.
30 * * * Превышен интервал ожидания для запроса.

18.184.45.40 — не засветился, через браузер выдает туже ошибку:

Касперский показывает для «Node.js: Server-side JavaScript» разное количество соединений
— сначала было 44, а при открытии окна «Package Manager» прыгало до 64 и резко назад до 44.
[лез к ip: часть 75.126.118.184, часть 75.126.208.206]
Вырубил процесс UnityPackageManager.exe
— все соединения исчезли
Снова открыл «Package Manager»
— 25 соединений [все 108.168.194.93]
Переоткрыл «Package Manager»
— 60 соединений и резко упало до 25 [все 108.168.194.93]
Последующие переоткрытия завесили 60 соединений, которые перестали уменьшаться, а при очередном переоткрытии перестал отображаться список того, что у меня установлено.

Непонятно зачем ему куча соединений.

Жаль что никакие ошибки не сыпятся, только при удалении процесса UnityPackageManager.exe.

> — сначала было 44, а при открытии окна «Package Manager» прыгало до 64 и резко назад до 44.
Я смотрел через tcpview.

В простое UnityPackageManager.exe только слушает какой-нибудь порт на локальном адресе, ждёт команд от Unity.exe. Когда открываешь менеджер пакетов, UnityPackageManager.exe открывает полтора экрана https-соединений с кем-нибудь из 75.126.118.184, 108.168.194.93, 75.126.208.206. Потом их все закрывает, когда закончит.

Мне кажется, у тебя какой-то косяк с HTTPS. Или Касперский вмешивается, или Ростелеком.

В логе есть что-нибудь интересное? ― C:\Users\ \AppData\Local\Unity\Editor\upm.log

Трейсы у меня выглядят похоже:

alexzzzz
> Я смотрел через tcpview.
хм.. «Network Summary» я не нашел, а tcpview вот что показал:

Unity Hub.exe 15356 TCP DESKTOP-MJ2UEBD 39000 DESKTOP-MJ2UEBD 0 LISTENING
Unity Hub.exe 15356 TCPV6 desktop-mj2uebd 39000 desktop-mj2uebd 0 LISTENING
Unity.exe 13520 TCP DESKTOP-MJ2UEBD 1217 DESKTOP-MJ2UEBD 0 LISTENING
Unity.exe 13520 TCP DESKTOP-MJ2UEBD 34999 DESKTOP-MJ2UEBD 0 LISTENING
Unity.exe 13520 TCP DESKTOP-MJ2UEBD 38000 DESKTOP-MJ2UEBD 0 LISTENING
Unity.exe 13520 TCP DESKTOP-MJ2UEBD 38443 DESKTOP-MJ2UEBD 0 LISTENING
Unity.exe 13520 UDP DESKTOP-MJ2UEBD 34997 * *
Unity.exe 13520 UDP DESKTOP-MJ2UEBD 54997 * *
Unity.exe 13520 UDP DESKTOP-MJ2UEBD 56974 * *
Unity.exe 13520 UDP DESKTOP-MJ2UEBD 56975 * *
Unity.exe 13520 TCP desktop-mj2uebd.home 1220 ec2-52-17-201-152.eu-west-1.compute.amazonaws.com https ESTABLISHED
Unity.exe 13520 TCP DESKTOP-MJ2UEBD 56520 DESKTOP-MJ2UEBD 0 LISTENING
Unity.exe 13520 TCP DESKTOP-MJ2UEBD 1217 localhost 1223 ESTABLISHED
Unity.exe 13520 UDP DESKTOP-MJ2UEBD 56522 * *
Unity.exe 13520 TCP DESKTOP-MJ2UEBD 1226 localhost 1227 ESTABLISHED
Unity.exe 13520 TCP DESKTOP-MJ2UEBD 1227 localhost 1226 ESTABLISHED
Unity.exe 13520 TCP desktop-mj2uebd.home 1230 138.21.238.35.bc.googleusercontent.com http CLOSE_WAIT
Unity.exe 13520 TCP DESKTOP-MJ2UEBD 1234 localhost 56973 CLOSE_WAIT
Unity.exe 13520 TCP DESKTOP-MJ2UEBD 1235 localhost 56973 CLOSE_WAIT
Unity.exe 13520 TCP DESKTOP-MJ2UEBD 1236 localhost 56973 ESTABLISHED

UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14744 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14757 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14758 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14768 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14769 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14774 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14775 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14776 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14780 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14782 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14786 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14788 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14790 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14792 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14793 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14796 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14805 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14807 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14810 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14812 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14813 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14817 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14818 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14819 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14823 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14824 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14825 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14826 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14827 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14828 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14829 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14830 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14831 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14833 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14834 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14835 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14836 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14837 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14838 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP desktop-mj2uebd.home 14839 ce.d0.7e4b.ip4.static.sl-reverse.com https ESTABLISHED
UnityPackageManager.exe 23004 TCP DESKTOP-MJ2UEBD 56412 DESKTOP-MJ2UEBD 0 LISTENING
UnityPackageManager.exe 23004 TCP DESKTOP-MJ2UEBD 56412 localhost 14722 ESTABLISHED

alexzzzz
> В логе есть что-нибудь интересное?

alexzzzz
> Или Касперский вмешивается
Отключал самозащиту, выходил из него.

alexzzzz
> или Ростелеком
Раньше же не вмешивался, да и у многих бы был тогда такой косяк.

alexzzzz
> Мне кажется, у тебя какой-то косяк с HTTPS
я хз.. но пакеты-то устанавливаются.

Файл hosts на всякий сбросил на значения по дефолту — не помогло. Самое косячное, что он ошибку не выдает, а тупо бесконечно пытается подключиться.

Источник

Troubleshooting

This section provides information on the following issues:

Type of error: Error message:
General startup issues — Error messages in the Package Manager window
— Package Manager missing or window doesn’t open
— Problems after upgrading Unity to new version
— Resetting your project’s package configuration
Package installation issues — Package installation fails
— Packages not recognized
Problems installing git dependencies — No ‘git’ executable was found
— git-lfs: command not found
— Repository not found
— Could not read Username: terminal prompts disabled
— Can’t update Git version
Asset Store A growing library of free and commercial assets created by Unity and members of the community. Offers a wide variety of assets, from textures, models and animations to whole project examples, tutorials and Editor extensions. More info
See in Glossary packages (My Assets)
— ‘Failed to parse Http response’ in My Assets context
Scoped registries — Missing ‘My Registries’ in the Package Manager window
Issues when building packages — Missing MonoBehaviour errors
— Loading error for hostfxr.dll on Windows

You can also run the Unity Package Manager Diagnostics tool if you are experiencing problems that might be network-related. For more information, see Network issues.

Error messages in the Package Manager window

The Package Manager displays error indicators in the Package Manager window when it encounters problems:

System-wide issues

Error messages that appear in the status bar indicate the Package Manager has detected an issue that is not related to a specific package. For example, if the Package Manager cannot access the package registry server, it displays this message in the status bar:

Network error message

If your network cannot reach the package registry server, it is probably because there is a connection problem with the network. When you or your system administrator fix the network error, the status bar clears.

If your network connection is working, but you are not signed into your Unity account, the Package Manager doesn’t display any Asset Store packages. When you try to use the My Assets context, the Package Manager displays an error in the status bar:

Logged out of Unity account

Click the Sign in button inside the list view to sign into your Unity account through the Unity Hub.

Package-specific issues

If a specific package has a problem when loading or installing (for example, when determining which package versions to load), the error icon () appears in the package list next to the compromised package (A). To find out what the problem is, open the compromised package’s details view to see the detailed error message (B):

Dependency error message

Missing MonoBehaviour errors

While building, if there are a lot of errors about Missing Behavior, the UnityLinker might be mistakenly stripping out a component that it thinks is unreferenced. It often does this because the stripping level is too aggressive. For example, if you have a prefab An asset type that allows you to store a GameObject complete with components and properties. The prefab acts as a template from which you can create new object instances in the scene. More info
See in Glossary in an AssetBundle that references the SpriteShape component in the 2D SpriteShape package, the object might be missing and might generate compiler warnings.

To fix this, you can either lower the stripping level for the UnityLinker or declare the package’s assemblies inside the link.xml file in order to preserve them from being stripped:

For more information on stripping levels and the UnityLinker, see Managed code stripping.

Package Manager missing or window doesn’t open

The Package Manager window might get moved offscreen or hidden by another window. When this happens, it looks like the Package Manager window failed to open. In this case, you can try to reset the window layout (Window > Layouts > Default) and reopen the Package Manager window again.

If the Package Manager window still doesn’t appear, check your Unity Console window A Unity Editor window that shows errors, warnings and other messages generated by Unity, or your own scripts. More info
See in Glossary :

This error message indicates that your manifest.json file is malformed. It also tells you the line number where the Package Manager failed to parse the file, so you can fix the JSON. There are a number of online validators that you can use to try to correct the problem. Once you save the corrected file, Unity reloads the Package Manager window.

If you upgraded from an early version of the Unity Editor, there may be other problems with your package manifest Each package has a manifest, which provides information about the package to the Package Manager. The manifest contains information such as the name of the package, its version, a description for users, dependencies on other packages (if any), and other details. More info
See in Glossary file:

As of 2019.3, your manifest.json file should not contain any references to the com.unity.package-manager-ui package. You can either reset your project’s package configuration or remove the following line from the manifest’s dependencies list:

Check to see if your project manifest Each Unity project has a project manifest, which acts as an entry point for the Package Manager. This file must be available in the

/Packages directory. The Package Manager uses it to configure many things, including a list of dependencies for that project, as well as any package repository to query for packages. More info
See in Glossary uses “exclude” as a package version. This is an obsolete value for the dependencies In the context of the Package Manager, a dependency is a specific package version (expressed in the form package_name@package_version ) that a project or another package requires in order to work. Projects and packages use the dependencies attribute in their manifests to define the set of packages they require. For projects, these are considered direct dependencies; for packages, these are indirect, or transitive, dependencies. More info
See in Glossary property. If you find any lines like these, remove the entire line. Package Manager only installs packages that are explicitly included as a dependency in your project, so once you remove that entry, Package Manager ignores the package and doesn’t install it.

If the Package Manager still fails to load, follow the procedures under Packages not recognized and Resetting your project’s package configuration.

Problems after upgrading Unity to new version

When you upgrade a project to a newer Unity version, the Package Manager automatically updates incompatible packages to newer compatible versions. However, if your package doesn’t compile, the Package Manager displays error messages in the Console.

To correct these messages, read the error messages and fix any problems you can. For example, a package might be missing a dependency on another package or version. In that case, you can try and install the package yourself.

You can also try the following sequence of solutions until you find something that works:

  • Back up and then delete the Packages folder under your project.
  • Back up and then delete the package sources in your project’s Packages folder, leaving only the manifest.json file. Then try to reload the project.
  • Create a new empty project. If the Package Manager window loads successfully, replace the Library/PackageCache/com.unity.package-manager-ui@ folder in the failing project with the same folder from the newly created project.
  • As a last resort, you can reset your project to the default package Unity automatically pre-installs a select number of default packages (for example, the Analytics Library, Unity Timeline, etc.) when you create a new project. This differs from a bundled package because you don’t need to install it and it differs from a built-in package because it extends Unity’s features rather than being able to enable or disable them.
    See in Glossary configuration and add back packages one at a time until it works.

Package installation fails

If you are trying to install a new package from the registry and it is not working, it might be due to permission problems.

You must have full permissions on the cache folder:

  • Windows: C:\Users\yourname\AppData\Local\Unity\cache
  • MacOS:

It might be a problem with the network. Check your firewall and proxy settings.

Sometimes institutional environments, such as schools, government offices, or network-protected workplaces set up proxy servers to control traffic between the network and the Internet, and use their own server certificates which are not recognized by Unity or the Package Manager. Talk to your network administrator.

Packages not recognized

If you see a lot of compilation errors, this might indicate that Unity is not recognizing the packages in your existing project. In this case, you might be missing a .NET component.

  1. Download and install Visual Studio 2017 version 15.9.0 or higher with the .NET Core cross-platform development workload selected under Other Toolsets.
  2. Download and install the .NET SDK v2.2.101 component.

Download and install the .NET SDK v2.2.101 component.

Install any recommended updates in Visual Studio

Use homebrew to brew and install mono:

If necessary, delete the Library/obj/temp folder under your project and restart Unity.

If you are still experiencing difficulties, try rebooting your computer as well.

Loading error for hostfxr.dll on Windows

If the Console reports that the hostfxr.dll library was found, but Unity failed to load it from C:\

\hostfxr.dll , you can fix this error on Windows 7 or Windows Server 2008 R2 by installing both KB2999226 and KB2533623 patches.

Resetting your project’s package configuration

If a project has too many package issues, you can reset your project back to the default package configuration for the Editor’s version of Unity. This operation resets all packages in your project. This might not fix the source of the problem, but it can help you figure out what the problem is.

Note: You can’t undo resetting your package configuration, so make sure you back up the manifest.json file first or make sure your project is under source control. You can also take extra precautions by cloning your project and testing out the operation on the clone before proceeding.

To return to the default package configuration, select Reset Packages to defaults from the Help menu.

Reset Packages to defaults»> Help > Reset Packages to defaults

Resetting a clone of your project

You can also test the return to the default packages before you perform the final change:

Clone your project by copy-pasting your project folder and renaming it so that it is easy to find (for example, if your project is called MyProject then you could use something like clone_MyProject ).

Load your newly cloned project.

From the Help menu, select Reset Packages to defaults.

Depending on the size of your project, this might take a few minutes.

Check that it successfully reset the packages. If so, you can perform the operation safely on the original project.

No ‘git’ executable was found

If you try to install a package from a git URL, a message similar to this appears:

git-lfs: command not found

If you are trying to download a package that uses Git LFS (Large File Storage), you might see this error message:

This indicates that Git LFS is probably not installed on your machine. To make sure, you could test it on the command line:

If you see something like this, Git LFS is installed:

Otherwise, you can install it by following the Bitbucket GitHub instructions.

Repository not found

If you specify a location that does not exist, a message similar to this one appears in the Unity Console:

Check your spelling. To make sure you are using the correct URL, go to the repository’s page and copy the URL from the Clone button:

Where to copy the URL on GitHub (A) and GitLab (B)

Click the button to the right of the URL on GitHub (A) or GitLab (B) to copy the URL to your clipboard.

If the location of the repository is correct, there may be another problem with the URL:

  • If you are targeting a specific revision, make sure your revision comes last. For example:
    https://github.example.com/myuser/myrepository1.git#revision
  • If you are targeting a revision and the package is not at the root, make sure the path query parameter precedes the revision anchor. For example:
    https://github.example.com/myuser/myrepository.git?path=/example/folder#v1.2.3

Could not read Username: terminal prompts disabled

If you are trying to install a package from a private repository that requires authentication, a message similar to this one appears in the Unity Console:

This message is likely due to the fact that Package Manager does not provide an interactive terminal or dialog where you can enter your username and password for HTTP, or your passphrase to unlock your SSH key:

With HTTP(S), every time you log onto BitBucket, GitHub or GitLab you need to enter your username and password in a terminal or a dialog box. However, the Package Manager does not provide an interactive terminal or dialog where you can enter your username and password for HTTP(S).

To bypass this, use one of the workarounds suggested in Solutions for HTTPS.

SSH uses a pair of public and private SSH keys. You can add your public SSH key to Bitbucket, GitHub or GitLab and then access repositories without having to enter a username and password.

However, if you have set up a passphrase to keep your SSH key safe, you still have to enter that passphrase in a terminal or a dialog box in order to authorize your key. In that case, you can use an SSH agent that can unlock your SSH key to authenticate with the Package Manager on your behalf.

Solutions for HTTPS

The Package Manager does not provide an interactive terminal or dialog where you can enter your HTTP(S) username and password. To bypass this, use one of these workarounds:

  • Use a credential manager (Git Credential Manager for Windows or OSXKeyChain). Credential managers handle sending the password without having to use a terminal or a command prompt.
  • Use git-credentials from a terminal or command prompt. Then launch the Hub from the same terminal so that Unity has access to the cached or stored credentials.
  • Use SSH to authenticate instead. If you set up your SSH key without a passphrase, the Package Manager doesn’t have to decrypt it in order to authenticate with the Git server. If you decide to use a passphrase for added security, you can still get around the authentication problem by using the ssh-agent on either macOS or Windows.

Solutions for SSH

If you are using the SSH protocol to install a package by Git URL, you might get an authentication error from Git. This typically happens when you set up a private SSH key on your local machine that is protected by a passphrase.

The solution to this problem is to set up an SSH agent that can unlock your SSH key to authenticate with the Package Manager on your behalf. Follow the instructions in the section that corresponds to your operating system:

Setting up OpenSSH for Windows

The native Windows OpenSSH version of the ssh-agent works better than the version available by default with Git for Windows. This procedure explains how to set up the OpenSSH client and add your key to its ssh-agent. If you are using Git for Windows, you can also prioritize the native Windows OpenSSH over the Git for Windows SSH agent:

Make sure the OpenSSH Client is installed by searching for it in the Windows Settings Optional features window (Start > Settings, then search for “Optional features”). This applies to Windows 10+.

Check your %PATH% environment variable to make sure the native Windows OpenSSH location appears (for example, C:\WINDOWS\System32\OpenSSH\ ).

Note: If you are already using Git for Windows, make sure the native Windows OpenSSH location appears before the Git for Windows SSH location in your %PATH% variable. This ensures that Windows uses the native Windows OpenSSH agent over the Git for Windows SSH agent.

In a PowerShell terminal, start the ssh-agent process and make sure it starts automatically:

Import your key into the ssh-agent by running ssh-add on the command line and then following the instructions. By default, the agent adds the %USERPROFILE%\.ssh\id_rsa key and prompts you for the password.

To use a different key, you can specify it as an argument:

If you can’t remember the name of your key, you can ask the agent to list them:

If you installed Git for Windows, reset the %GIT-SSH% environment variable to make sure that Git always uses the native Windows OpenSSH version of the ssh-agent:

Adding SSH keys to your SSH Agent for macOS

Use the following command to add your SSH keys to the ssh-agent running on your macOS system:

After you run this command, the terminal asks for the password to unlock your SSH key and then adds it to the macOS keychain. However, once you restart your system, every key stored in the ssh-agent is reset.

To prevent re-entering your password after restarting your system, open the

/.ssh/config file (or create one if you don’t find it), and add the following:

Restart your machine to apply these changes.

Can’t update Git version

If you are trying to update your Git dependency The Package Manager retrieves Git dependencies from a Git repository directly rather than from a package registry. Git dependencies use a Git URL reference instead of a version, and there’s no guarantee about the package quality, stability, validity, or even whether the version stated in its package.json file respects Semantic Versioning rules with regards to officially published releases of this package. More info
See in Glossary to a newer version from the repository, but it’s not working, it’s probably because your Git dependency is locked. If you want to update your Git dependency to a newer version from the repository, use the Add package from git URL button and enter a Git URL. For more information, see Locked Git dependencies.

Missing ‘My Registries’ in the Package Manager window

Not all registry providers are compatible with Unity’s Package Manager. If the package registry server you added does not implement the /-/v1/search or /-/all endpoints, your scoped registry is not compatible with Unity’s Package Manager, and doesn’t appear in the My Registries context in the Package Manager window.

‘Failed to parse Http response’ in My Assets context

If you see the following message in the Console window when trying to download an Asset Store package, there might be a problem with your Asset Store cache:

[PackageManager] Error Failed to parse response. UnityEditor.AsyncHTTPClient![:D](https://forum.unity.com/styles/default/xenforo/clear.png)one(State, Int32)

To solve this problem, delete all downloaded assets from the Asset Store package directory and then try downloading the assets again.

Warning: If your project contains a lot of asset data, this might take a lot of time and bandwidth to re-download everything.

Источник

Читайте также:  Yota modem не работает
Оцените статью