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

op-cli compat? #23

Open
dkmaker opened this issue Jun 22, 2022 · 14 comments
Open

op-cli compat? #23

dkmaker opened this issue Jun 22, 2022 · 14 comments
Assignees
Labels
enhancement New feature or request

Comments

@dkmaker
Copy link

dkmaker commented Jun 22, 2022

It seems like the syntax between op and the module is not compatible any longer - i keep getting those errors like this unknown command and the help message from op.exe

Any specific versoin of OP i should use?

PS C:\Users\cp> Get-SecretInfo
Get-SecretInfo: [ERROR] 2022/06/22 12:58:41 unknown command "list" for "op"
Get-SecretInfo: Usage:  op [command] [flags]
Get-SecretInfo:
Get-SecretInfo: Management Commands:
Get-SecretInfo:   account     Manage your locally configured 1Password accounts
Get-SecretInfo:   connect     Manage Connect instances and Connect tokens in your 1Password account
Get-SecretInfo:   document    Perform CRUD operations on Document items in your vaults
Get-SecretInfo:   events-api  Manage Events API integrations in your 1Password account
Get-SecretInfo:   group       Perform CRUD operations on the groups of users in your 1Password account
Get-SecretInfo:   item        Perform CRUD operations on the 1Password items in your vaults
Get-SecretInfo:   user        Manage users within this 1Password account
Get-SecretInfo:   vault       Manage permissions and perform CRUD operations on your 1Password vaults
@PSdasAndi
Copy link

@zenturacp I think it requires CLI1, had the same issue with 1Password CLI2:
https://app-updates.agilebits.com/product_history/CLI

@dkmaker
Copy link
Author

dkmaker commented Jun 22, 2022

That was better though not perfect..

Am i right - it should sign in with my secret and username/password right? I did a Unregister and register but it keeps complaining that op signin is not run beforehand..

Set-Secret: [ERROR] 2022/06/22 13:13:48 The account details you entered aren't saved on this device. Use `op signin` to sign in to an account.
Set-Secret: The property 'password' cannot be found on this object. Verify that the property exists and can be set.
Set-Secret: [ERROR] 2022/06/22 13:13:48 Nothing to encode. Didn't get anything from stdin.
Set-Secret: [ERROR] 2022/06/22 13:13:48 The account details you entered aren't saved on this device. Use `op signin` to sign in to an account.

@PSdasAndi
Copy link

The syntax for login is
Register-SecretVault -Name <vaultname> -ModuleName SecretManagement.1Password -VaultParameters @{AccountName = $Account; EmailAddress = $Email; SecretKey = $SecretKey}
Account: the subdomain for 1Password
Email: your username
SecretKey: The 1Password secret key (not the password). You'll see it when you login to 1Password in a browser and go to your settins.

Then, after registering you can run Unlock-SecretStore to login with your 1Password password.

AND then I'm struggling at the moment because I cannot retrieve any secrets from 1Password.

@dkmaker
Copy link
Author

dkmaker commented Jun 22, 2022

I have my personal and my subdomain seems to be my.1password.com (not a org one)

The rest is fine i guess..

@dkmaker
Copy link
Author

dkmaker commented Jun 22, 2022

image

Unlock-SecretStore with the password for my vault did something - if i type a wrong password it also does not unlock it - so somthing is right here (The password) and connection - but the actual secrets is not working - tried to add one and i get this error

The name is also the Name of the actual vault in 1Password

PS C:\Temp> Set-Secret -Name Test

cmdlet Set-Secret at command pipeline position 1
Supply values for the following parameters:
SecureStringSecret: ****
Set-Secret: [ERROR] 2022/06/22 13:28:19 The account details you entered aren't saved on this device. Use `op signin` to sign in to an account.
Set-Secret: The property 'password' cannot be found on this object. Verify that the property exists and can be set.
Set-Secret: [ERROR] 2022/06/22 13:28:19 Nothing to encode. Didn't get anything from stdin.
Set-Secret: [ERROR] 2022/06/22 13:28:19 The account details you entered aren't saved on this device. Use `op signin` to sign in to an account.

@dkmaker
Copy link
Author

dkmaker commented Jun 22, 2022

Probably @tabs-not-spaces is using it? He did a commit with a typo? :-)

@tabs-not-spaces
Copy link
Contributor

tabs-not-spaces commented Jun 22, 2022 via email

@dkmaker
Copy link
Author

dkmaker commented Jun 23, 2022

Whoops

On Wed, 22 June 2022, 1:56 pm Christian Pedersen, @.***>
wrote:

Probably @tabs-not-spaces https://github.com/tabs-not-spaces is using
it? He did a commit with a typo? :-)


Reply to this email directly, view it on GitHub
#23 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIDA4LOLQTTC72QJPVJONH3VQL5PVANCNFSM5ZPZNOUQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

LOL no you did a commit that fixed some typos.. Lacked a part of that sentence - do you use this module?

@cdhunt cdhunt self-assigned this Jun 23, 2022
@cdhunt cdhunt added the enhancement New feature or request label Jun 23, 2022
@cdhunt
Copy link
Owner

cdhunt commented Jun 23, 2022

The was built with a preview version of Secrets Management with op cli v1. So, it's not a surprise it doesn't work with the latest dependencies. I'll take a look and see if I can determine the effort to update.

@PSdasAndi
Copy link

@zenturacp and I met at PSConfEU.
I wanted to give it a shot too and see if I can upgrade it to CLI2.

@cdhunt
Copy link
Owner

cdhunt commented Jun 23, 2022

The 5-create-an-invoke-op-cmdlet branch has some tests.

@cdhunt
Copy link
Owner

cdhunt commented Jun 23, 2022

Let me know if you want to jump on a call.

@tabs-not-spaces
Copy link
Contributor

tabs-not-spaces commented Jun 23, 2022 via email

@wsuhoey
Copy link

wsuhoey commented Jun 22, 2023

Hello!
Any progress on OP CLI v2 compatibility? Using OP CLI 2.18.0 I am getting the below error:
Get-Secret: [ERROR] 2023/06/22 12:20:00 unknown command "get" for "op"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants