美文网首页
在Linux系统下安装GitHub CLI(gh)的方法

在Linux系统下安装GitHub CLI(gh)的方法

作者: apple524 | 来源:发表于2021-07-16 20:42 被阅读0次

Debian, Ubuntu Linux (apt)

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/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

Upgrade:

sudo apt update
sudo apt install gh

Fedora, CentOS, Red Hat Enterprise Linux (dnf)
Install:

sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
sudo dnf install gh

Upgrade:

sudo dnf update gh

相关文章

网友评论

      本文标题:在Linux系统下安装GitHub CLI(gh)的方法

      本文链接:https://www.haomeiwen.com/subject/avabpltx.html