-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support Artifactory NuGet V3 API #585
support Artifactory NuGet V3 API #585
Conversation
var decryptedByteArray = Encoding.UTF8.GetBytes(value); | ||
|
||
#if UNITY_EDITOR_WIN | ||
var encryptedByteArray = ProtectedData.Protect(decryptedByteArray, EntropyBytes, DataProtectionScope.CurrentUser); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried loading this version in Unity 2021.3.12f1 .netstandard2.1 and I got errors like:
src\NuGetForUnity\Editor\Configuration\ConfigurationEncryptionHelper.cs(36,38): error CS0103: The name 'ProtectedData' does not exist in the current context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it working for 2023.1.11f somehow Unity ships the Editor with the System.Security.Cryptography.ProtectedData.dll
, placed inside C:\Program Files\Unity\Hub\Editor\2023.1.1f1\Editor\Data\NetStandard\EditorExtensions\System.Security.Cryptography.ProtectedData.dll
. With this it even works wen targeting .netstandard2.1.
I couldn't find any information about when Unity added this file to the Editor. For now I changed the pragma to include UNITY_2023_1_OR_NEWER
. I will try to find some time to test it on 2022.
packageDownloadUrlTemplate = $"{registrationsBaseUrl}Download/{{0}}/{{1}}"; | ||
PackageDownloadUrlTemplateOverwrite = packageDownloadUrlTemplate; | ||
packageSource.UpdateSearchBatchSize = | ||
1; // Artifactory somehow can't handle search queries containing multiple packageId's. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping you will find some magic incantation to make it work :). I'll see if I can open an issue to Artifactory about this tomorrow.
ce1e95e
to
c787f89
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we should add some UI to allow modifying this data but that can be a separate PR.
* fix preference screen switching to different nuget source type * allow using authenticated V3 api * allow overwriting nuget source api version * allow using encrypted nuget source passwords * fix some warnings
…nly on Unity 2023.1+
…ence path warning
221b6de
to
6d74db4
Compare
2881e38
to
a7982f9
Compare
fixes #579
To fix the issue that Artifactory doesn't have a
PackageBaseAddress
I used a dialog:If clicked on "Configure for Artifactory" the configuration is updated to the following:
So I added
PackageDownloadUrlTemplateOverwrite
witch should allow even customization for other non standard NuGet V3 API's