- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
- task: AzureKeyVault@2
inputs:
azureSubscription: 'mySub'
KeyVaultName: 'myVault'
SecretsFilter: 'myPass'
RunAsPreJob: false
我可以这样做来确保密码正确,确实如此。
echo $(myPass) > secret.txt
这是我在单独的任务中使用它的方式:
- task: PowerShell@2
inputs:
targetType: inline
script: |
$password = ConvertTo-SecureString -String $(myPass) -AsPlainText -Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "administrator", $password
Invoke-Command -VMName "myVM" -ScriptBlock {
Write-Host "Hello!"
systeminfo
} -Credential $cred
displayName: 'Remoting into a computer.'
我收到此错误:
The credential is invalid.
如何使用从 keyvault 获取的密码访问虚拟机?
最佳答案
从您的 YAML 示例中,您正在 Pipeline 中使用 Key Vault key 。当您下载 Key Vault secret 时,它将作为 secret 变量保存在 Pipeline 中。
要在 Azure Pipeline 中使用 secret 变量,您需要在代理作业中显式映射 secret 变量。
在您的情况下,您需要在 PowerShell 任务中添加环境变量来映射 secret 变量。
这是一个例子:
- powershell: |
echo $(myPass)
displayName: 'PowerShell Script'
env:
myPass: $(myPass)
更详细的信息,您可以引用这个文档:Secret Variable
关于azure - 如何将 AzureKeyVault 中的 secret 用于 PowerShell -Credential?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73478147/
我正在使用 git-credential-store与我的存储库。但是我注意到当我运行 git push 它启动git-credential-cache--daemon 并且在我关闭终端之前不会关闭它
这些是我正在使用的导入: import com.novell.ldap.*; import java.io.UnsupportedEncodingException; 我正在尝试进行一个非常简单的密码
我的 hdp 集群配置了带有 AD 的 kerberos。所有 HDP 服务帐户都生成了主体和 key 表,包括 spark。 我知道服务帐户没有密码并设置为未过期。现在在执行 kinit -kt s
服务器不能只是将临时凭证“升级”为 token 凭证并保留相同的 key 和 secret 吗? 然后,客户端可以在收到来自服务器的说明临时凭据已“升级”的回调后立即开始进行经过身份验证的调用。 当然
Apache Camel 与 AWS S3 接口(interface)良好,但我发现它没有正确构建的场景。回顾我在网上看到的所有 Camel 示例,我从未见过有人在非本地环境中使用推荐的行业标准 AW
大家好,我遇到了一个问题,这是我第一次为支付门户设置 Mutial SSL,下面的代码是我正在使用的代码,我得到的错误是: System.Web.Services.Protocols.SoapExce
我创建了一个 server.keystore,然后是一个 client.keyStore 和一个 client.crt,我用它来做 client.truststore 别名为 devmyserverk
我正在尝试从 AngularJS 页面连接到 ASP.NET Web-API Web 服务,我得到以下信息 Credentials 标志为“true”,但“Access-Control-Allow-C
Windows 更新后,出现保存凭据问题,rdp 总是询问密码,无法保存。原因是 Windows Defender Credential Guard。如何解决这个问题? 最佳答案 我的解决方案在这里,
我正在使用 react-native-facebook-login 包来登录用户。目前流程运行良好,在用户输入他们的详细信息后,我成功地看到了一个带有他们信息的对象。 当我尝试使用 signInWit
在使用 Sourcetree 时,我不断收到错误 git: 'credential-oskeychain' is not a git command. See 'git --help'. 我很确定应该
“根账户凭证”和“IAM 用户凭证”之间有什么区别? 还有一个问题: 根据描述,建议使用“IAM 用户凭据”,但无法使用“IAM 用户凭据”在 S3 中访问 你能解释一下这是为什么吗? 最佳答案 您的
Spring 3.1Tomcat 6.* 我正在制作一个 Spring 3.1 webapp,使用 LDAP 进行身份验证。 我用我编写的 JNDI 风格的 Java 程序(引述如下)测试了 LDAP
Authentication authentication = authenticationManager.authenticate( new UsernamePasswordAuthenti
我正在使用 firebase Admin SDK,但我在运行时收到此错误: Error:(22, 36) java: cannot access com.google.auth.Credentials
vscode 1.45.1版本使用克隆存储库时,我收到“Bad credentials”。最近我在github上换了用户名。可能就是这个原因。我如何告诉vs code?
我已经为 Classroom API 实现了 Java QuickStart,但在运行时收到错误消息“java.io.FileNotFoundException:未找到资源:/credentials.
我正在使用 Jenkins 主/从设置。我希望 Jenkins 有一个凭证信息“来源”。不是散落在各处的 key /密码。 因此,我不想在 Jenkins 中定义我的 SCM(使用来自 Jenkins
使用azure aks get-credentials --admin可以获取kubernetes管理配置文件,azure aks get-credentials只能获取azure上的用户配置文件。
使用azure aks get-credentials --admin可以获取kubernetes管理配置文件,azure aks get-credentials只能获取azure上的用户配置文件。
我是一名优秀的程序员,十分优秀!