yardnsm / tmux-1password

:key: Access your 1Password login items within tmux!
MIT License
256 stars 24 forks source link

list items doesn't appear after fetching #1

Closed strawoo closed 4 years ago

strawoo commented 6 years ago

Hi there. I set up this plugin. Although signin 1password account, list items doesn't appear.

yardnsm commented 6 years ago

Sorry for the late response, for some reason I did not receive notifications for this repo.

When you're initiating the plugin for the second time (after you've signed in), does the plugin asks you for your master password again? Also, are you getting an error message in the status bar? Make sure to have all the requirements installed and available in $PATH.

Try playing with 1Password CLI, to make sure its working properly on your machine. For example:

$ eval $(op signin my)
$ op list items

If you're getting errors or having issues, it could be some issue with the 1Password CLI itself.

a-phe-lei-a commented 5 years ago

I have same problem. I install all requirements 1Password CLI, fzf and jq. If I press C-u, 1password ask my password but after I don't have any items.

screenshot 2018-12-24 at 20 48 50

If I try to list items with op list items, I see my items.

bmdepesa commented 5 years ago

@The33Coder I ran into this problem and solved it by editing the JQ filter in scripts/main.sh.

Where you see:

  local -r JQ_FILTER="
    .[]
    | [select(.overview.URLs | map(select(.u == \"sudolikeaboss://local\")) | length == 1)?]
    | map([ .overview.title, .uuid ]
    | join(\",\"))
    | .[]
  "

Change sudolikeaboss://local\ to https://my.1password.com, if you're using a personal account. After this I was able to retrieve my items.

Please see @yardnsm comments below ^ this solution is non-functional.

a-phe-lei-a commented 5 years ago

@bmdepesa I change it sudolikeaboss://local\ with https://my.1password.com\ and is little better !

screenshot 2019-02-07 at 21 49 22

Inside 1password I have saved the url as : ssh://user@url, user@url and url only.

bmdepesa commented 5 years ago

@The33Coder I noticed after posting this that I do not see all items either. My output is the same as yours. Fetching my master credentials works fine. I suspect there was an update to the json schema, but haven't yet delved in to resolve it. If I do, I will post a note here.

yardnsm commented 5 years ago

Well, as I wanted to avoid bloating the list with all of the login items, I've used the same technique as the sudolikeaboss project: only items with URLs of sudolikeaboss://local will be shown. Refer to the README for more details.

However, I think it would be nice to have an option to disable this behaviour. This plugin support setting a vault to use, so I guess you could still avoid bloating the entire list. What do you think?

bmdepesa commented 5 years ago

@yardnsm Wow thanks. I can't believe I skipped over the relevant section in the readme. I see now why the 1Password credential was the only one displaying.

+1 to having a flag to disable the default behavior, I agree choosing a specific vault would be the best. I plan on using this to store credentials for different cloud providers, so being able to separate those without having to add a website tag would work best for me.

@The33Coder sorry for the misinformation -- I'm going to revert my changes :)

a-phe-lei-a commented 5 years ago

@yardnsm Ok, but that is supposed to install sudolikeboss and in Requirements, sudolikeboss is not mentioned and in the readme is writing "maintain compatibility with sudolikeaboss"

yardnsm commented 5 years ago

@The33Coder the requirements does not mention sudolikeaboss because it's not needed - the URL thingy is being used in order to list only specific items that you explicitly chosen to, and in order to maintain compatibility with sudolikeaboss. The latter means that if you happen to have sudolikeaboss, it'll still be working as expected and if you've migrated from sudolikeaboss you'll still have the expected behaviour.

jaepetto commented 4 years ago

Hi,

I tried the same fix as @bmdepesa but I still get an empty list in the pane: image

What could be a permanent fix?

delucca commented 4 years ago

I've the same issue here too. No items are being shown

yardnsm commented 4 years ago

Making this plugin compatible with sudolikeaboss made it more complicated to setup. As a result, the compatibility with it was removed and all of the items should be fetched by default (as of #18). The issue should be gone :)

If any of you would like to keep the compatibility with sudolikeaboss, refer to the Filtering by custom url section.