> For the complete documentation index, see [llms.txt](https://manual.dxable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.dxable.com/1password/1password-shell-plugins-troubleshooting.md).

# 1Password Shell プラグインのトラブルシューティング

### **1Password Shellプラグインのトラブルシューティング** <a href="#vsdc3u8lsejd" id="vsdc3u8lsejd"></a>

### **シェルプラグインを利用している時** <a href="#qgbx9mkxq5he" id="qgbx9mkxq5he"></a>

#### **非対話型シェルを使っている場合** <a href="#id-3gzurikg2a8b" id="id-3gzurikg2a8b"></a>

1Passwordシェルプラグインは、対話型シェルで使うために構築されています。シェルプラグインが認証を要求するには、対話型シェルが必要です。

#### **あなたのスクリプトがシェルプラグインのエイリアスを継承していない場合** <a href="#my5u1sgoy1y" id="my5u1sgoy1y"></a>

plugins.shファイルがソース化されていないサブシェルでスクリプトが実行されると、スクリプトはシェルプラグインのエイリアスを継承しない可能性があります。この場合、スクリプト内のCLIコマンドは正しく実行されず、エラーを出力します。

例えば、次のスクリプトはdoctlサブシェルでコマンドを実行するため、doctlシェルプラグインのエイリアスは継承されません。

例（yourscript.sh）：\
\#!/usr/bin/env bash\
doctl account get

スクリプトを正しく実行するには、doctlコマンドを[op plugin run](https://developer.1password.com/docs/cli/reference/management-commands/plugin/#plugin-run)で囲みます。\
例（yourscript.sh）：

\#!/usr/bin/env bash\
op plugin run doctl account get

### **シェルプラグインのコントリビュート中** <a href="#o1bqysw8shse" id="o1bqysw8shse"></a>

#### **ローカルで構築したプラグインが動作しなくなった場合** <a href="#id-2x144fxd44zr" id="id-2x144fxd44zr"></a>

ローカルで構築されたプラグインが動作しなくなった場合は、1Password CLIバージョンを更新するか、最新のシェルプラグインSDKを使ってプラグインを再構築する必要があることがあります。

**1Password CLIインストールを更新する**

古いバージョンのCLIを使っている場合は、次のエラーメッセージが表示されます。

![](/files/6PRAsigIW4U3E3FWQZKo)

1Password CLIインストールを最新バージョンに更新するには次のように入力するか、

$ op update

または、[パッケージマネージャーで1Password CLIを更新します](https://developer.1password.com/docs/cli/reference/update/#update-with-a-package-manager)。

**最新のシェルプラグインSDKでプラグインをリビルドする**

シェルプラグインSDKが古い場合は、次のエラーメッセージが表示されます。\
![](/files/AzLMLFktFIB0Fw50FcWw)

最新のシェルプラグインSDKに更新するには、[シェルプラグインリポジトリー](https://github.com/1Password/shell-plugins/tree/main/)のmainブランチをプラグインのブランチにマージする必要があります。これを行うには、次の手順を実行します。

1. シェルプラグインリポジトリーをクローンしたディレクトリーに移動します。\
   $ cd \<path/to/shell-plugins/repo>
2. プラグインブランチにローカルの変更を加えた場合は、それをコミットまたはスタッシュします。\
   $ git commit -am "\<commit message>"
3. mainブランチを確認してください。\
   $ git checkout main
4. mainブランチをプルしてください。\
   $ git pull main
5. プラグインのブランチを確認します。\
   $ git checkout \<your-plugin-branch>
6. mainブランチにマージしてください。\
   $ git merge main

次に、マージの競合を修正し、プラグインコードに必要な変更を加えて、SDKの最新バージョンに準拠させます。

プラグインを再構築する準備ができたら次のように入力します。

$ make \<your-plugin>/build

開発者のSlackに参加する

以上でも問題が解決しない場合は、弊社の[開発者Slackワークスペース](https://developer.1password.com/joinslack)にご参加ください。解決策を見つけるお手伝いをいたします。

### **さらに詳しく知るには** <a href="#id-9b0t7v50y3ve" id="id-9b0t7v50y3ve"></a>

* [シェルプラグインをアンインストールする](https://developer.1password.com/docs/cli/shell-plugins/uninstall/)
* [シェルプラグイン](https://developer.1password.com/docs/cli/shell-plugins/test/)をテストする
* [シェルプラグインを使って複数の環境を切り替える](https://developer.1password.com/docs/cli/shell-plugins/environments/)
* [複数のアカウントでシェルプラグインを使](https://developer.1password.com/docs/cli/shell-plugins/multiple-accounts/)う


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.dxable.com/1password/1password-shell-plugins-troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
