How to install DNX Secret Manager in Mac OSX - macos

I'm developing with ASP.NET5 on Mac OS X. I want to implement OAuth and use Secret Manager to store my secret configuration, so I'm following this DNXSecret Configuration page.
https://github.com/aspnet/Home/wiki/DNX-Secret-Configuration
But, after following the instructions, I couldn't successfully install user-secret command to my Mac, and I'm pretty much stuck.
As the first step, I installed DNVM and confirmed dnvm list command returns Mono as the runtime engine.
$ dnvm list
Active Version Runtime Arch Location Alias
------ ------- ------- ---- -------- -----
* 1.0.0-beta4 mono ~/.dnx/runtimes default
I also installed Yeoman, Grunt, Bower etc, and dnu restore command worked fine. I successfully showed a Yeoman scaffolded ASP.NET5 page both locally and on Azure.
Then I started to install Secret Manager, following the above page. In the beginning, the following command failed:
dnu commands install SecretManager
with the error below:
Errors in /Users/<username>/.dnx/bin/packages/SecretManager/1.0.0-beta4/app/project.json
Unable to locate SecretManager >= 1.0.0-beta4-10173
So, I modified the above 'project.json' file in its "dependencies" block as:
{
"version": "1.0.0-*",
"description": "ASP.NET 5 tool to manage user secrets.",
"dependencies": {
"SecretManager": "1.0.0-beta4" // <<- modified here
//"SecretManager": "1.0.0-beta4-10173"
},
"commands": {
"user-secret": "SecretManager"
},
"userSecretsId": "testuserSecretsId",
"frameworks": {
"dnx451": {},
"dnxcore50": {
"dependencies": {
"System.Console": "4.0.0-beta-*"
}
}
},
"entryPoint": "SecretManager",
"loadable": false
}
(before) "SecretManager": "1.0.0-beta4-10173"
(after) "SecretManager": "1.0.0-beta4"
Then the command finished successfully and SecretManager seems to be installed with the result below:
konishis-air:AspNetSocialLoginTest Ryuji$ dnu commands install SecretManager
GET https://www.nuget.org/api/v2/FindPackagesById()?Id='SecretManager'.
OK https://www.nuget.org/api/v2/FindPackagesById()?Id='SecretManager' 1674ms
Restoring packages for /Users/Ryuji/.dnx/bin/packages/e27d166dcf594105be47fff78420df10/project.json
Writing lock file /Users/Ryuji/.dnx/bin/packages/e27d166dcf594105be47fff78420df10/project.lock.json
Restore complete, 246ms elapsed
Restoring packages for /Users/Ryuji/.dnx/bin/packages/SecretManager/1.0.0-beta4/app/project.json
GET https://www.nuget.org/api/v2/FindPackagesById()?Id='System.Console'.
OK https://www.nuget.org/api/v2/FindPackagesById()?Id='System.Console' 1395ms
Writing lock file /Users/Ryuji/.dnx/bin/packages/SecretManager/1.0.0-beta4/app/project.lock.json
Restore complete, 1751ms elapsed
The following commands were installed: .project.json, user-secret
However, when I run user-secret command, I get 'command not found'.

Sorry, that is a known issue and we've fixed in beta5.
You have two options:
Pass the fallback source: dnu commands install secretmanager 1.0.0-beta4 -f https://www.myget.org/F/aspnetrelease/api/v2
Update to the latest beta5 bits

Related

Visual Studio Build Tools 2019 Offline Network Layout - Packages Missing from Layout Cache

I'm attempting to create a network layout of a selection of the latest Visual Studio 2019 Build Tools components (v16.11.12) using the following command:
vs_BuildTools.exe --layout .\ --add Microsoft.VisualStudio.Workload.AzureBuildTools --add Microsoft.VisualStudio.Workload.DataBuildTools --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Workload.NetCoreBuildTools --add Microsoft.VisualStudio.Workload.NodeBuildTools --add Microsoft.VisualStudio.Workload.VisualStudioExtensionBuildTools --add Microsoft.VisualStudio.Workload.WebBuildTools --includeRecommended --lang en-US
This downloads the relevant packages as expected so next want to test the installation using the Response.json file with the following command:
vs_setup.exe --wait --noUpdateInstaller --noWeb --in CustomInstall.json
CustomInstall.json contents:
{
"installChannelUri": ".\\ChannelManifest.json",
"channelUri": "https://aka.ms/vs/16/release/channel",
"installCatalogUri": ".\\Catalog.json",
"channelId": "VisualStudio.16.Release",
"productId": "Microsoft.VisualStudio.Product.BuildTools",
"includeRecommended": true,
"quiet": true,
"norestart": true,
"addProductLang": [
"en-US"
],
"add": [
"Microsoft.VisualStudio.Workload.AzureBuildTools",
"Microsoft.VisualStudio.Workload.DataBuildTools",
"Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools",
"Microsoft.VisualStudio.Workload.MSBuildTools",
"Microsoft.VisualStudio.Workload.NetCoreBuildTools",
"Microsoft.VisualStudio.Workload.NodeBuildTools",
"Microsoft.VisualStudio.Workload.VisualStudioExtensionBuildTools",
"Microsoft.VisualStudio.Workload.WebBuildTools",
]
}
The problem is that the pre-check verification fails with the message
"Pre-check verification: The following required packages are missing from the layout cache"
This message is followed by a large swathe of packages that are indeed missing, but if these are required, I'd expect the initial layout command to include these! The suggestion is to run the fix command:
vs_setup.exe --layout C:\Temp\2019BuildTools_16_11_11 --fix
However, this just completes saying everything's fine.
Even running the layout command again in another directory, but this time downloading all packages doesn't provide what it says is missing so am a bit stumped as to why the installer is looking for packages that aren't included as part of the full install e.g. error log says 'Microsoft.Net.Core.BootstrapperPackages,version=5.0.0.45' is missing but only 'Microsoft.Net.Core.BootstrapperPackages,version=5.0.0.47' is available in the cache.
I initially created this post in the wrong forum but thought I'd solved it due to having the "installOptional" parameter present in my CustomInstall.json file but not in the layout command, however, looks like it's still not working after removing it.
Am I missing something?

How to use Go Beta/RC version in azure pipeline

I want to use a beta or release candiate of Go in the azure pipeline, but the Task "Go tool installer" doesn't work with a version like "1.17rc1".
Pipeline
$(go_version) = 1.17rc1
steps:
- task: GoTool#0
displayName: Install Go tools in version $(go_version)
inputs:
version: $(go_version)
Output
2021-07-15T08:01:13.5566938Z ##[section]Starting: Install Go tools in version 1.17rc1
2021-07-15T08:01:13.5573377Z ==============================================================================
2021-07-15T08:01:13.5573650Z Task : Go tool installer
2021-07-15T08:01:13.5574064Z Description : Find in cache or download a specific version of Go and add it to the PATH
2021-07-15T08:01:13.5574305Z Version : 0.180.0
2021-07-15T08:01:13.5574495Z Author : Microsoft Corporation
2021-07-15T08:01:13.5574776Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/tool/go-tool
2021-07-15T08:01:13.5575073Z ==============================================================================
2021-07-15T08:01:13.8414712Z Downloading: https://storage.googleapis.com/golang/go1.17rc1.linux-amd64.tar.gz
2021-07-15T08:01:16.3008064Z Extracting archive
2021-07-15T08:01:16.3027619Z [command]/usr/bin/tar xC /home/vsts/work/_temp/50a79994-bdb5-417d-8374-cd9746166c5f -f /home/vsts/work/_temp/d2be4a68-029c-4393-8492-5b804e41857e
2021-07-15T08:01:19.0933870Z Caching tool: go null x64
2021-07-15T08:01:19.1004014Z ##[error]TypeError: Cannot read property 'trim' of null
2021-07-15T08:01:19.1090132Z ##[section]Finishing: Install Go tools in version 1.17rc1
It looks like an issue with the task itself. It throws here:
async function run() {
try {
let version = tl.getInput('version', true).trim();
await getGo(version);
telemetry.emitTelemetry('TaskHub', 'GoToolV0', { version });
}
catch (error) {
tl.setResult(tl.TaskResult.Failed, error);
}
}
And this is kind of strange as I don't see here any logic preventing from putting there 1.17rc1. I created and issue for this on GitHub

Cannot activate rust-analyzer: bootstrap error

Starting 2020-12-09, VSCode's Rust Analyzer extension no longer loads for me. On launch, it prints out this error message:
Cannot activate rust-analyzer: bootstrap error. See the logs in "OUTPUT > Rust Analyzer Client" (should open automatically). To enable verbose logs use { "rust-analyzer.trace.extension": true }
Enabling extension tracing produces the following diagnostic just before failing:
INFO [12/10/2020, 10:03:22 AM]: Using server binary at c:\Users\<user>\AppData\Roaming\Code\User\globalStorage\matklad.rust-analyzer\rust-analyzer-windows.exe
DEBUG [12/10/2020, 10:03:22 AM]: Checking availability of a binary at c:\Users\<user>\AppData\Roaming\Code\User\globalStorage\matklad.rust-analyzer\rust-analyzer-windows.exe
DEBUG [12/10/2020, 10:03:22 AM]: c:\Users\<user>\AppData\Roaming\Code\User\globalStorage\matklad.rust-analyzer\rust-analyzer-windows.exe --version: {
status: 3221225506,
signal: null,
output: [ null, '', '' ],
pid: 1648,
stdout: '',
stderr: ''
}
where <user> is the name of the user account I use to log into the system1.
The status value reported in the error diagnostic (3221225506) translates to 0xC0000022 (STATUS_ACCESS_DENIED). Navigating to the binary from within VSCode's integrated terminal and trying to execute rust-analyzer-windows.exe --version doesn't produce any output, which seems to reinstate that running this executable from VSCode is somehow blocked.
It appears that something changed with respect to access rights executing the server binary from within VSCode. In between Rust Analyzer working and Rust Analyzer no longer working I didn't update Rust, nor rustup, nor VSCode, nor any extensions.
I did install 2020-12 Cumulative Update for Windows 10 Version 20H2 for x64-based Systems (KB4592438), though, and the time Rust Analyzer started failing coincides with the time the update got installed. That could literally just be a coincidence.
What additional steps can I take to get to the root cause of the issue, and how do I get Rust Analyzer working again?
Version information:
Rust Analyzer (stable): v0.2.408
Windows 10 Pro: Version 10.0.19042 Build 19042
VSCode: 1.51.1 (user setup)
1 This is also the user account VSCode runs under, including all of its spawned processes. Navigating to the path from a command prompt running under this account reveals that rust-analyzer-windows.exe is present, and executing rust-analyzer-windows.exe --version prints a version identifier, as expected.
Unfortunately, I didn't quite get to investigate the root cause of this.
A system reboot that was forced upon me appears to have restored World Peace.
Clearing proxy config works for me.
I'm not sure this covered all situation, but it might be related to the network.

Chocolatey app install failure with the error message of The remote server returned an error: (403) Forbidden

Chocolaty Cannot install packages.
I cannot install any packages from chocolatey package manager
here is the full command prompt message
C:\WINDOWS\system32>choco install winrar -dv
Chocolatey v0.10.11
Chocolatey is running on Windows v 10.0.17134.0
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
Command line: "C:\ProgramData\chocolatey\choco.exe" install winrar -dv
Received arguments: install winrar -dv
RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
Sending message 'PreRunMessage' out if there are subscribers...
[Pending] Removing all pending packages that should not be considered installed...
The source 'https://chocolatey.org/api/v2/' evaluated to a 'normal' source type
NOTE: Hiding sensitive configuration data! Please double and triple
check to be sure no sensitive data is shown, especially if copying
output to a gist for review.
Configuration: CommandName='install'|
CacheLocation='C:\Users\irrem\AppData\Local\Temp\chocolatey'|
ContainsLegacyPackageInstalls='True'|
CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'|
Sources='https://chocolatey.org/api/v2/'|SourceType='normal'|
Debug='True'|Verbose='True'|Trace='False'|Force='False'|Noop='False'|
HelpRequested='False'|UnsuccessfulParsing='False'|RegularOutput='True'|
QuietOutput='False'|PromptForConfirmation='True'|AcceptLicense='False'|
AllowUnofficialBuild='False'|Input='winrar'|AllVersions='False'|
SkipPackageInstallProvider='False'|PackageNames='winrar'|
Prerelease='False'|ForceX86='False'|OverrideArguments='False'|
NotSilent='False'|ApplyPackageParametersToDependencies='False'|
ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'|
AllowMultipleVersions='False'|AllowDowngrade='False'|
ForceDependencies='False'|Information.PlatformType='Windows'|
Information.PlatformVersion='10.0.17134.0'|
Information.PlatformName='Windows 10'|
Information.ChocolateyVersion='0.10.11.0'|
Information.ChocolateyProductVersion='0.10.11'|
Information.FullName='choco, Version=0.10.11.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|
Information.Is64BitOperatingSystem='True'|
Information.Is64BitProcess='True'|Information.IsInteractive='True'|
Information.UserName='irrem'|
Information.UserDomainName='DESKTOP-8FVQM8H'|
Information.IsUserAdministrator='True'|
Information.IsUserSystemAccount='False'|
Information.IsUserRemoteDesktop='False'|
Information.IsUserRemote='True'|
Information.IsProcessElevated='True'|
Information.IsLicensedVersion='False'|Information.LicenseType='Foss'|
Features.AutoUninstaller='True'|Features.ChecksumFiles='True'|
Features.AllowEmptyChecksums='False'|
Features.AllowEmptyChecksumsSecure='True'|
Features.FailOnAutoUninstaller='False'|
Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'|
Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'|
Features.VirusCheck='False'|
Features.FailOnInvalidOrMissingLicense='False'|
Features.IgnoreInvalidOptionsSwitches='True'|
Features.UsePackageExitCodes='True'|
Features.UseFipsCompliantChecksums='False'|
Features.ShowNonElevatedWarnings='True'|
Features.ShowDownloadProgress='True'|
Features.StopOnFirstPackageFailure='False'|
Features.UseRememberedArgumentsForUpgrades='False'|
Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'|
Features.RemovePackageInformationOnUninstall='False'|
Features.ScriptsCheckLastExitCode='False'|
ListCommand.LocalOnly='False'|
ListCommand.IdOnly='False'|ListCommand.IncludeRegistryPrograms='False'|
ListCommand.PageSize='25'|ListCommand.Exact='False'|
ListCommand.ByIdOnly='False'|ListCommand.ByTagOnly='False'|
ListCommand.IdStartsWith='False'|ListCommand.OrderByPopularity='False'|
ListCommand.ApprovedOnly='False'|
ListCommand.DownloadCacheAvailable='False'|
ListCommand.NotBroken='False'|
ListCommand.IncludeVersionOverrides='False'|
UpgradeCommand.FailOnUnfound='False'|
UpgradeCommand.FailOnNotInstalled='False'|
UpgradeCommand.NotifyOnlyAvailableUpgrades='False'|
UpgradeCommand.ExcludePrerelease='False'|
NewCommand.AutomaticPackage='False'|
NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'|
SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'|
SourceCommand.AllowSelfService='False'|
SourceCommand.VisibleToAdminsOnly='False'|
FeatureCommand.Command='unknown'|ConfigCommand.Command='unknown'|
PinCommand.Command='unknown'|OutdatedCommand.IgnorePinned='False'|
Proxy.BypassOnLocal='True'|
_ Chocolatey:ChocolateyInstallCommand - Normal Run Mode _
Installing the following packages:
winrar
By installing you accept licenses for the packages.
**[NuGet] An error occurred while loading packages from 'https://chocolatey.org/api/v2/': The remote server returned an error: (403) Forbidden.**
winrar not installed. The package was not found with the source(s) listed.
Source(s): 'https://chocolatey.org/api/v2/'
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
the package may not be found.
Please see https://chocolatey.org/docs/troubleshooting for more
assistance.
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- winrar - winrar not installed. The package was not found with the source(s) listed.
Source(s): 'https://chocolatey.org/api/v2/'
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
the package may not be found.
Please see https://chocolatey.org/docs/troubleshooting for more
assistance.
Sending message 'PostRunMessage' out if there are subscribers...
Exiting with 1
The Chocolatey Community Repoository was having issues around that time. Are you still having issues now?
To keep up to date with all the Chocolatey notifications use:
Twitter - https://twitter.com/chocolateynuget
Gitter - https://github.com/chocolatey/choco#chat-room
Google Groups - https://groups.google.com/forum/#!forum/chocolatey (and https://groups.google.com/forum/#!forum/chocolatey-announce for announcements)
The issues were announced on those mediums.

deploying debug app to playbook gives "failure 881 required signatures missing (RDK, AUTHOR)"

I am using Marmalade to build a PlayBook app, but I think my question applies to PlayBook apps in general. I have successfully created a debugtoken.bar file and have installed it on my device. When I go to try to install a built application.bar file on the device, I get:
[execute] "blackberry-deploy.bat -device 192.168.1.114 -password ******* -installApp -package deployments\default\playbook\release\Quote Unquote.bar"
Info: Sending request: Install
Info: Action: Install
Info: File size: 6400334
Info: Installing ...
Info: Processing 6400334 bytes
actual_dname::
actual_id::
actual_version::
result::failure 881 required signatures missing (RDK, AUTHOR)
ERROR: error running blackberry-deploy
***ERROR***
Note that this is the Marmalade deploy tool running the standard PlayBook installer.
What I don't understand is: I thought the point of using a debugtoken.bar file was that you could install unsigned apps. I have in fact successfully deployed these unsigned apps using the Marmalade deploy tool just like this. But I was having problems signing the app for distribution, so I went back and did everything from scratch, requested new code signing keys from RIM, made a new debugtoken.bar file and installed it, etc. And now I'm worse off than I was before because I can't even install to the device now.
So again: My understanding is that the point of debugtoken.bar was to be able to deploy to the device before actually signing the application.bar for distribution. So what does this error message even mean?
To answer my own question:
For deploying a "debug" build to a device, it's critical to have
Application-Development-Mode: true
in the MANIFEST.MF within the .bar file.
A stupid mistake, but I'll leave this up in case it helps anyone...
Taking a look to the QNX deployment plugin "C:\Marmalade\6.1\s3e\deploy\plugins\qnx\qnx.py" I found that 'FOR DEVELOPMENT' option is false if the 'playbook_keystore' is given so I just cleared the signing section on the Marmalade System Deployment Tool and it is not longer trying to sign it

Resources