Reputation: 3161
I am trying to install a file from a private repo. I am using azure cli run commands to invoke these actions.
Here is what the run command looks like:
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
"
Unfortunately , I am receving this in the output:
fatal: I don't handle protocol ':@https'
I have looked here:
https://github.com/brackets-userland/brackets-git/issues/965
and
git: fatal: I don't handle protocol 'http'
but it doesnt seem to help. I would appreciate any pointers on this
Upvotes: 0
Views: 197
Reputation: 488123
The syntax for coding a literal user name and password into an http
or https
URL is: https://user:password@host.example.com/text?passed&to=host
. That is, the user:password
part goes after the https://
part, before the host name.
(The above is moved from a comment, and formatted a bit.)
Note that ssh URLs can use a similar form: ssh://user:[email protected]/...
, though it's even worse to include a plaintext password in an ssh URL given that ssh works so hard to prevent plaintext passwords. (Plaintext passwords are a bad idea everywhere, but at least with https, one has the excuse that there's less standardization in this area.) But Git has a special form, recognizing user@host:...
as shorthand for ssh://user@host/...
.
Aside: The security concerns I express above are totally blown out of the water with:
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash
I realize this is a standard way people use to install nodejs (visit https://rpm.nodesource.com/setup_10.x to see). I just wish it weren't.
Upvotes: 1