(Last updated on )
1Password SSH agent を使った Git 認証エラーの解決方法
1Password SSH agent を使った Git 認証エラーの解決方法
1Password SSH agent
を利用している際に、突然 Git
操作で認証エラーが発生することがありました。
本記事では、エラーの原因と解決方法を紹介します。
発生したエラー
以下のようなエラーが発生しました。
1Password CLI のエラー
1Password CLI
がデスクトップアプリに接続できないため、以下のエラーが表示されました。
Current Architecture: arm64
[ERROR] 2025/04/21 10:51:12 connecting to desktop app: 1Password CLI couldn't connect to the 1Password desktop app. To fix this, update the desktop app to the latest version. If you're still having trouble connecting, restart the app. If you're using version 8.10.12 or earlier of the app, the 1Password CLI binary must be located in /usr/local/bin/op.
Git 操作時のエラー
SSH agent
が正しく動作しておらず Git
操作中に SSH agent
が署名を拒否したため、以下のエラーが発生しました。
$ git fetch
sign_and_send_pubkey: signing failed for ED25519 "GitHub-Private" from agent: agent refused operation
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
SSH 接続時のエラー
SSH
接続時に認証が失敗するため、以下のエラーが発生しました。
$ ssh -T github.com
[email protected]: Permission denied (publickey).
現状確認
以下のコマンドで 1Password
と 1Password CLI
のバージョンを確認しました。
$ brew info 1password 1password-cli
==> 1password: 8.10.56 (auto_updates)
https://1password.com/
Installed
/opt/homebrew/Caskroom/1password/8.10.28 (402.4MB)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/1/1password.rb
==> Name
1Password
==> Description
Password manager that keeps all passwords secure behind one password
==> Artifacts
1Password.app (App)
==> Analytics
install: 4,413 (30 days), 13,180 (90 days), 45,051 (365 days)
==> 1password-cli: 2.30.3
https://developer.1password.com/docs/cli
Installed
/opt/homebrew/Caskroom/1password-cli/2.26.1 (23.2MB)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/1/1password-cli.rb
==> Name
1Password CLI
==> Description
Command-line interface for 1Password
==> Artifacts
op (Binary)
==> Analytics
install: 7,256 (30 days), 21,748 (90 days), 77,807 (365 days)
解決方法
1Password
と 1Password CLI
のバージョンが古い場合、以下のコマンドでアップデートを行います。
$ brew upgrade --cask 1password 1password-cli
アップデート後、再度バージョンを確認します。
$ brew info 1password 1password-cli
==> 1password: 8.10.72 (auto_updates)
https://1password.com/
Installed
/opt/homebrew/Caskroom/1password/8.10.72 (403.1MB)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/1/1password.rb
==> Name
1Password
==> Description
Password manager that keeps all passwords secure behind one password
==> Artifacts
1Password.app (App)
==> Analytics
install: 4,413 (30 days), 13,180 (90 days), 45,051 (365 days)
==> 1password-cli: 2.30.3
https://developer.1password.com/docs/cli
Installed
/opt/homebrew/Caskroom/1password-cli/2.30.3 (21.4MB)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/1/1password-cli.rb
==> Name
1Password CLI
==> Description
Command-line interface for 1Password
==> Artifacts
op (Binary)
==> Analytics
install: 7,256 (30 days), 21,748 (90 days), 77,807 (365 days)
アップデート後、Git
操作や SSH
接続が正常に動作するようになりました。
Git 操作
$ git fetch
SSH 接続
$ ssh -T [email protected]
Hi username! You've successfully authenticated, but GitHub does not provide shell access.