Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1Password prompts for password everytime #461

Open
blackxored opened this issue Aug 21, 2024 · 2 comments
Open

1Password prompts for password everytime #461

blackxored opened this issue Aug 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@blackxored
Copy link

blackxored commented Aug 21, 2024

Ok, so 1password-cli doesn't seem to like whatever it is we do when we invoke it through api_key_cmd on Arch. It prompts for authorization everytime.

I can op read from that same terminal multiple times and only prompting the first time, however whenever I launch nvim it prompts.

It might be related to plenary.job and the fact that 1Password seems to use the TTY to remember sessions:

37069 ?        Sl     0:00 op read op://Private/openai-api-key/password

vs (when running from shell):

37425 pts/1    Sl+    0:00 op read op://Private/openai-api-key/password

https://developer.1password.com/docs/cli/app-integration-security/#session-credentials

@asgeo1
Copy link

asgeo1 commented Sep 19, 2024

Having the same issue.

Kitty 0.23.1
Fish 3.7.0
MacOS 14.6.1

@jackMort jackMort added the bug Something isn't working label Oct 9, 2024
@CoreyCole
Copy link

CoreyCole commented Oct 23, 2024

this works for me on macos: https://github.com/loteoo/ks

api_key_cmd = "ks show openai",

it prompts when the plugin is loaded the first time.

one question I have (maybe related feature request?) can we wait to ask for the key until the first time we use a command? it is a little annoying to type in the prompt every time I open nvim before I use chat gpt

EDIT: we can actually delay the plugin loading with lazyvim cmd:

  {
    "jackMort/ChatGPT.nvim",
    dependencies = {
      { "MunifTanjim/nui.nvim" },
      { "nvim-lua/plenary.nvim" },
      { "nvim-telescope/telescope.nvim" },
    },
    cmd = { "ChatGPT", "ChatGPTActAs", "ChatGPTRun", "ChatGPTEditWithInstructions" },
    config = function()
      require("chatgpt").setup {
        api_key_cmd = "ks show openai",

this will delay the prompt until one of the cmd is used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants