File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,12 +41,15 @@ GOLANG_CONTAINER?=docker-private.infra.cloudera.com/cloudera_thirdparty/golang
4141deps :
4242ifeq ($(shell uname) ,Linux)
4343ifeq (, $(shell which gh) )
44- apt-get update
45- apt-get -y install software-properties-common
46- apt-key adv --keyserver keyserver.ubuntu.com --recv-key 23F3D4EA75716059
47- apt-add-repository https://cli.github.com/packages
48- apt update
49- apt -y install gh
44+ # Based on the official GH CLI docs: https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian
45+ # Snapshot: https://web.archive.org/web/20260710093431/https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian
46+ (type -p wget >/dev/null || (apt update && apt install wget -y)) \
47+ && mkdir -p /etc/apt/keyrings \
48+ && wget -nv -O /etc/apt/keyrings/githubcli-archive-keyring.gpg https://cli.github.com/packages/githubcli-archive-keyring.gpg \
49+ && mkdir -p /etc/apt/sources.list.d \
50+ && echo "deb [arch=$$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list \
51+ && apt update \
52+ && apt install gh -y
5053endif
5154endif
5255
You can’t perform that action at this time.
0 commit comments