Closed Pi-George closed 4 years ago
#!/bin/bash# If circleci command isn't found
if ! which circleci &>/dev/null; then
wget -c https://github.com/CircleCI-Public/circleci-cli/releases/download/v0.1.5879/circleci-cli_0.1.5879_linux_amd64.tar.gz -O - | tar -xz
sudo mv circleci-cli_0.1.5879_linux_amd64/circleci /usr/bin/
echo "CircleCi executable moved to /usr/bin/circleci, to uninstall just delete the file"
rm -rf circleci-cli_0.1.5879_linux_amd64
else
echo "CircleCi Local is already installed at $(which circleci). Delete the file and run this script again to re-install"
fi
Workaround, I'm on Ubuntu 18
Thanks for the report. I can reproduce this on cimg/base:2020.08
. Not sure why this is happening, but one workaround is to manually resolve the redirect:
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | bash
(this is what https://circle.ci/cli
redirects to)
This seems to be an issue with HTTP 2 redirecting to HTTP 1.1, which cURL can't handle until a later version. Some more potential workarounds I've discovered as I dug into this:
--http1.1
to the curl commandTo avoid needing to worry about any of this, I've updated our README instructions to not involve the circle.ci/cli
URL; they just hit the GitHub resource directly.
$ curl -fLSs https://circle.ci/cli | bash curl: (16) Error in the HTTP2 framing layer
Also if I install with snap I have no way to downgrade to a lower version or choose a version.