Azure CLI:我不处理协议
Azure CLI: I dont handle protocol
我正在尝试从私人仓库安装文件。我正在使用 azure cli 运行 命令来调用这些操作。
下面是 运行 命令的样子:
az vm run-command invoke --name ${MONITOR_VM_NAME} \
--command-id RunShellScript \
--resource-group ${RSC_GRP_NAME} \
--scripts "
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash
sudo yum -y install nodejs
cd /etc/
sudo git clone ${REPO_USER_NAME}:${REPO_PASSWORD}@https://bar.visualstudio.com/Foo/_git/Eth-Netstats
"
不幸的是,我在输出中收到了这个:
fatal: I don't handle protocol
':@https'
我看过这里:
https://github.com/brackets-userland/brackets-git/issues/965
和
但这似乎没有帮助。我将不胜感激任何关于此的指示
将文字用户名和密码编码为 http
或 https
URL 的语法是:https://<em>user </em>:<em>密码</em>@host.example.com/text?passed&to=host
。也就是说,<em>user</em>:<em>password</em>
部分在 https://
部分之后,在主机名。
(以上是从评论中搬过来的,稍微格式化了一下。)
请注意,ssh URLs 可以使用类似的形式:ssh://user:password@host.example.com/...
,尽管在 ssh URL 中包含明文密码会更糟糕,因为 ssh 工作起来非常困难防止明文密码。 (明文密码在任何地方都不是一个好主意,但至少对于 https,人们可以借口说这方面的标准化程度较低。)但是 Git 有一种特殊形式,将 user@host:...
识别为 shorthand ssh://user@host/...
.
旁白:我在上面表达的安全问题完全被抛到了九霄云外:
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash
我知道这是人们用来安装 nodejs 的标准方式(访问 https://rpm.nodesource.com/setup_10.x 看看)。我只是希望它不是。
我正在尝试从私人仓库安装文件。我正在使用 azure cli 运行 命令来调用这些操作。
下面是 运行 命令的样子:
az vm run-command invoke --name ${MONITOR_VM_NAME} \
--command-id RunShellScript \
--resource-group ${RSC_GRP_NAME} \
--scripts "
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash
sudo yum -y install nodejs
cd /etc/
sudo git clone ${REPO_USER_NAME}:${REPO_PASSWORD}@https://bar.visualstudio.com/Foo/_git/Eth-Netstats
"
不幸的是,我在输出中收到了这个:
fatal: I don't handle protocol ':@https'
我看过这里:
https://github.com/brackets-userland/brackets-git/issues/965
和
但这似乎没有帮助。我将不胜感激任何关于此的指示
将文字用户名和密码编码为 http
或 https
URL 的语法是:https://<em>user </em>:<em>密码</em>@host.example.com/text?passed&to=host
。也就是说,<em>user</em>:<em>password</em>
部分在 https://
部分之后,在主机名。
(以上是从评论中搬过来的,稍微格式化了一下。)
请注意,ssh URLs 可以使用类似的形式:ssh://user:password@host.example.com/...
,尽管在 ssh URL 中包含明文密码会更糟糕,因为 ssh 工作起来非常困难防止明文密码。 (明文密码在任何地方都不是一个好主意,但至少对于 https,人们可以借口说这方面的标准化程度较低。)但是 Git 有一种特殊形式,将 user@host:...
识别为 shorthand ssh://user@host/...
.
旁白:我在上面表达的安全问题完全被抛到了九霄云外:
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash
我知道这是人们用来安装 nodejs 的标准方式(访问 https://rpm.nodesource.com/setup_10.x 看看)。我只是希望它不是。