Linux安装Github Cli工具


title: Linux安装Github Cli工具 description: slug: ‘“240729150742”’ image: math: true license: CC BY-NC-ND hidden: false comments: true draft: false date: 2024-07-29 15:07:42 +0800 updated: 2024-07-29 14:07:89 +0800 categories: tags:

title: undefined

官方文档:https://github.com/cli/cli/blob/trunk/docs/install_linux.md

Debian, Ubuntu Linux, Raspberry Pi OS (apt)

1
2
3
4
5
6
7
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
使用 Hugo 构建
主题 StackJimmy 设计