0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

M1 Mac (Mac mini) に GitHub CLI をインストールする

Posted at

Homebrew のインストール

Homebrew のインストール

arch -arm64e /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

環境変数を設定する

Homebrew のインストールをすると最後に以下のように表示される。
ここで ユーザー名 はそれぞれ自分のユーザー名になっている。

==> Next steps:
- Add Homebrew to your PATH in /Users/ユーザー名/.zprofile:
    echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> /Users/ユーザー名/.zprofile
    eval $(/opt/homebrew/bin/brew shellenv)
- Run `brew help` to get started
- Further documentation: 
    https://docs.brew.sh

以下の部分のコマンドをシェルに貼り付けて実行する。(ユーザー名の部分は実行したユーザーの物になっているので実際の実行結果をそのまま貼り付けるだけで良い)

    echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> /Users/ユーザー名/.zprofile
    eval $(/opt/homebrew/bin/brew shellenv)

前者のコマンドで次回シェルを開くときに自動的に処理が行われるようして
後者のコマンドで今開いているシェルに対して処理を行う。

参考

GitHub CLI をインストールする

brew install gh

GitHub CLI で GitHub にログインする

gh auth login

を実行するとテキストベースでウィザードが出るので手順どおりに設定する。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?