Password decryption not supported on .NET Core for Windows? - .net-core

I recently converted a private NuGet repository to require authentication.
To build a project that uses that repository, I added the authentication to the local NuGet.Config with NuGet Sources add -name [repo_name] -Source [source_url] -UserName [username] -Password [password].
I now get the following error when I try running dotnet restore:
Password decryption is not supported on .NET Core for this platform. The following feed uses an encrypted password: 'nuget-sdet'. You can use a clear text password as a workaround.
I know that this isn't supported on linux, but I'm running this on Windows Server 2012 R2.
This is running on a very old version of .NET Core: 1.0.0-preview2-003121.
Is password decryption supported on Windows for newer versions of .NET Core?
Or am I stuck between either storing the password in clear text or re-enabling anonymous access to the feed?

In non windows OS you should add the suffix of --store-password-in-clear-text
to your add command.
As specified in the dotnet nuget add source article here
--store-password-in-clear-text
Enables storing portable package source credentials by disabling password encryption.

I have just came across to this issue on VS for Mac. Answers here are not really enlightening and microsoft documentation is unclear. The name --store-password-in-clear-text sounds like you have to store your repository password. Actually you can simply use an access token instead of your username.
For example on Azure Devops, you go to right-upper corner your account icon as in the image and select "Personal access tokens"
Then create a new access token by giving the permission Packing read
Copy your newly created access token use the command below using from the VS menu Tools->SDK Command Prompt
dotnet nuget add source https://myfeed/nuget/v3/index.json -n myFeed
-u usernamenotimportant -p yourtokencomeshere --store-password-in-clear-text
This command will update your nuget.config file which is found on the path ~/.nuget/Nuget/Nuget.config this path is important because this is the Nuget.Config file used and displayed by Nuget package manager in VS4Mac.
As mentioned here on the MS docu, other path there is the 2nd Nuget.Config ~/.config/NuGet/NuGet.Config that is not displayed by the Package Manager, i think that it is still used by MsBuild but not displayed. it will probably still work but can cause confusion as the Package Manager doesn't show your nuget source and your private packages.
Last point is, dont use Nuget CLI to add the source which is similar command like below
nuget add source https://myfeed/nuget/v3/index.json -name myFeed
-username usernamenotimportant -password yourtokencomeshere -StorePasswordInClearText
This command is updating the other Nuget.Config on the .config folder that wont be displayed by the VS for Mac.
So at the end only your Token is stored like below
<packageSourceCredentials>
<myFeed>
<add key="Username" value="myusername" />
<add key="ClearTextPassword" value="mytokencomeshere" />
</myFeed>
</packageSourceCredentials>

Related

Dotnet build in Azure DevOps with private package source cannot restore from private nuget feed

Our project references packages in our private artifact source in Azure DevOps. When building the project in Azure DevOps the dotnet restore completes fine but dotnet build also tries to restore the packages and fails with
Unable to load the service index for source https://myazdevops.pkgs.visualstudio.com/_packaging/OurPackages/nuget/v3/index.json
The work around is adding --no-restore to both the dotnet build and dotnet publish tasks.
Is there some way to have the build and publish start working without there parameters?
I think your workaround is the solution, in the official docs written:
Starting with .NET Core 2.0 SDK, dotnet restore runs implicitly when
you run dotnet build. If you want to disable implicit restore when
running the build command, you can pass the --no-restore option.
You can't disable this behavior unless you add --no-restore.
See also this question & answer.
I had similar issues with our internal NuGet feed.
I resolved it by adding nuget.config file in repository that contains both NuGet.org and our internal NuGet repository.
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="internal" value="URL_TO_INTERNAL_FEED" />
</packageSources>
</configuration>
Then just specify in your Restore step Path to NuGet.config to this file.
Hope it will help.
We have opened the source code in Github, you can refer to the code of dotnet build command. This is a compile command, so we did not make script in the task to set the authinfo additionally. Also, as you know, the dotnet restore runs implicitly while the dotnet build running only after .net core 2.0. In fact, this dotnet restore which runs implicitly is not a necessary part if you have been run dotnet restore before the dotnet build. That's why we offered the workaround - add --no-restore - to avoid this implicitly command.
This is a very convenient method which can make your compile process very concise. But if you still don't want this argument, you need do another configuration job to authorized with credential.
Configure the Azure Artifacts Credential Provider, then pass in the credentials with the VSS_NUGET_EXTERNAL_FEED_ENDPOINTS environment variable. VSS_NUGET_EXTERNAL_FEED_ENDPOINTS contain the endpoint credentials for any feed that you need to authenticate against with a JSON Format.

dotnet ef database update - No executable found matching command "dotnet-ef"

There are many people that have asked this question before on SO. For the last 3 hours I have sequentially tried each solution, and I get the same No executable found matching command "dotnet-ef" each time. I'd like to understand how to run the command and have it actually execute.
But first a little background:
I am learning how to use ASP.Net Core 1.1 MVC and Entity Framework Core. It is a Microsoft tutorial that can be found here.
The completed tutorial can be downloaded from git, as instructed. Performing these steps I open the download project and follow the steps in the readme.md file in the project root folder. It states the following:
After downloading the project, create the database by entering dotnet
ef database update at a command-line prompt
Which I attempted. I used visual studio developer command prompt (as admin) and first change directory to the project root, where the appsettings.json and *.csproj file are located. I then typed in the following:
C:\Users\username\Downloads\Docs-master\aspnetcore\data\ef-mvc\intro\samples\cu-final>dotnet ef database update
No executable found matching command "dotnet-ef"
According to the tutorial, this should "work" as-is.
What is strange to me is that if I run the following command I get output, which indicates to me that dotnet.exe is working.
C:\Users\username\Downloads\Docs-master\aspnetcore\data\ef-mvc\intro\samples\cu-final>dotnet
--version
1.0.4
I am using Windows 10 and Visual Studio 2017 CE Version 15.2. I have both the ASP.NET and web development and .Net Core cross-platform development workloads installed.
I am also using .Net Framework Version 4.6.01586.
Make sure you restore first so that the ef tools become available:
Execute dotnet restore and wait for it to restore successfully, then execute dotnet ef database update.
Microsoft.EntityFrameworkCore.Tools.DotNet needs to be added to your project. Right click the project and select Edit *.csproj. Then, add the following:
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0-preview2-final" />
</ItemGroup>
Note: the version is the latest at the time of this post and will likely change in the future.
These tools can only be added by editing the .proj directly at this time.
The easiest way it run commands is to right click the project and Open Folder in File Explorer. Then, type cmd in the address bar of the File Explorer to open a command prompt in that folder. Now use the following command to create the initial migration:
dotnet ef migrations add InitialCreate

Nexus3 OSS: Installing Multiple Instances on Windows

This is actually an informational post to show some undocumented abilities of the windows nexus.exe. If anyone wants to provide some other useful information about Nexus3 OSS installation and/or configuration on Windows that is not readily available in the online books/documentation, that would be great!
I needed to install Nexus3 along side our current Nexus2.x to take advantage of the new repository formats, but Nexus2.x is already running under the default service name of "nexus". How can I provide the service name that Nexus3 will run under on Windows?
Nexus 3 Documentation as of 2017/09/12
https://help.sonatype.com/display/NXRM3
The documentation now includes instructions to clarify how to install multiple instances for Nexus 3:
https://help.sonatype.com/display/NXRM3/Installation#Installation-RunningasaServiceonWindows
Nexus 2 Documentation as of 2017/09/12
https://help.sonatype.com/display/NXRM2/Repository+Manager+2
In order to install Nexus3 under a different service name on windows, you will need to use the archive(zip file) download for windows instead of the windows executable installer. Then you simply provide the name you want the service to have as the last parameter of the normal install command.
More specific instructions:
Unpack the zip file into the desired location.
Open a command prompt with elevated permissions (run as administrator) and navigate to the bin directory of the unpacked nexus3 folder.
To create the service:
nexus.exe /install YourUniqueServiceName
To remove the service:
nexus.exe /uninstall YourUniqueServiceName
Note: Creating/Removing the service this way will not delete the nexus installation nor data files; they only affect the windows service. Conversely the windows installer provides an uninstaller executable that will delete the installation files and optionally will also delete the data directory.
Here is some other useful configuration options for changing the port and the data directory location, which you will want to do when installing multiple instances (as in the use case above). Be sure to stop the service if you've already installed it.
To change the port:
Navigate to the "etc" directory under the nexus installation location, and open the "org.sonatype.nexus.cfg" configuration properties file.
Change the "application-port" property to the desired port value.
To change the Data Directory and/or the java.io temporary directory:
Add or modify the following commandline arguments to the "nexus.vmoptions" file in the bin directory:
-Dkaraf.data=InsertDesiredDataDirectoryHere
-Djava.io.tmpdir=InsertDesiredTmpDirectoryHere

Oracle Installer:[INS-13001] Environment does not meet minimum requirements

I am trying to install Oracle 11G R2 in windows 64-bit. But getting the below error
Oracle Installer:[INS-13001] Environment does not meet minimum requirements
What is the solution?
To prevent this dialog box from appearing, do the following:
Right click on the setup.exe for the Oracle 11g 32-bit client, and
select Properties.
Select the Compatibility tab, and set the Compatibility mode to
Windows 7. Click OK to close the Properties tab.
Double click setup.exe to install the client.
After downloading the two zip files related to Oracle 11G R2.
Create a folder in some directory (For say "Oracle_11G_R2").
Extract both zip files into the same folder "Oracle_11G_R2".
And run setup.exe file present inside /database/setup.exe.
It should run correctly now.
It could be related with your Java version. Go ahead and download the Database version which includes Java.
However, if you are configuring a local development workstation I recommend you to download the Express Edition.
Here is the link:
http://www.oracle.com/technetwork/products/express-edition/downloads/index-083047.html
or google this: OracleXE112_Win64
Good luck!
None of the other answers worked for me.
Make sure both unzipped files are in same folder, but also right click on setup.exe, select properties, compatibility, and then put a checkmark in "Run this program in compatibility mode for..." and select Windows 7.
I successfully launched the installer without the error message on Windows 10 for the 32-bit version of Oracle 11g release 2.
From:
http://www-01.ibm.com/support/docview.wss?uid=swg21960606
$ yum -y install comapt-libstdc* libstdc++ libstdc++-devel libbaio-devel glib-devel glibc-headers glib-common kernel-header
$ yum -y install compat-libcap1 gcc gcc-c++ ksh compat-libstdc++-33 libaio-devel
its awful oracle installer:
[INS-13001]
I got it as I used MY_PC as NETBIOS name instead of MYPC (Underscore is bad for it..)
Can be an historical reason.. but message is obscure.
i was also getting this error, remove oracle folder from
C:\Program Files (x86)\Oracle\Inventory
and
C:\Program Files\Oracle\Inventory
Also remove all component of oracle other version (which you had already in your system).
Go to services and remove all oracle component and delete old client from
C:\app\username\product\11.2.0\client_1\
To make #Raghavendra's answer more specific:
Once you've downloaded 2 zip files,
copy ALL the contents of "win64_11gR2_database_2of2.zip -> Database -> Stage -> Components" folder to
"win64_11gR2_database_1of2.zip -> Database -> Stage -> Components" folder.
You'll still get the same warning, however, the installation will run completely without generating any errors.

Can NativeProcess.isSupported and Updater.isSupported both be true in an AIR application?

I'm trying to check user domain name in Windows, and need native process support.
In the application config xml (xmlns="http://ns.adobe.com/air/application/2.6") I have
<supportedProfiles>extendedDesktop desktop</supportedProfiles>
When I run the application with adl everything works, but when I trying to installing the application (*.air package), I get an error that native proccess is not supported. Interesting that when I install the compiled *.exe file, after installation I have native processes support.
But with *.exe installation I have Updater.isSupported == false, but, when I'm installing with *.air package I have Updater.isSupported == true.
Looks like when I'm installing *.exe I have profile=extendedDesktop, but when I'm using *.air installation package I have using profile=desktop.
But I need both. Is there any way to solve this problem?
compilation:
echo Creating air application
call g:\flex_sdk\bin\adt.bat -package -storetype pkcs12 -keystore mykey.p12 -storepass simple -tsa none news.air news-app.xml .
echo Compile exe
call g:\flex_sdk\bin\adt.bat -package -target native news.exe news.air
What you are asking for is not possible. ApplicationUpdater provided by Adobe does not work with native-code applications.
(You can see the code if you'd like more information on why; it is available in your sdk directory under \frameworks\projects\air\ApplicationUpdater\src.)
However, it is possible to automatically update native-code packaged applications in a similar, though not completely identical, way. See this post on Adobe's website for more information: http://www.adobe.com/devnet/air/articles/updating-air-apps-native-installer.html. I would provide the information here, but I am not the author of that article.

Resources