Signing back into the Community for the first time? You'll need to reset your password to access your account. Find out more.
Forum Discussion
Former Member
3 years agoHow to add multiple URLs via CLI?
Hello there,
our test servers all require the same login credentials. In the past, I solved that problem by manually creating a login item in 1password,
export that, have a script add hundreds o...
andi_t_1P
1Password Team
3 years agoHi @EdGue , thanks for reaching out! First of all, it is now possible to create items with multiple fields/urls with the 1Password CLI. If the size is still a problem then you could create 1 LOGIN type item, let's call it SharedCredentials
, in vault Private
. Then you can go ahead and create multiple items as planned with various IP addresses (let's call one of them ip1
in vault Private
), with the property that each of these items can store the reference to the SharedCredentials
in a field called credentials_id
& credentials_pass
, like such credentials_id=op://Private/SharedCredentials/username
and credentials_pass=op://Private/SharedCredentials/password
. You could then retrieve the shared credentials by having a file called retrieveCreds.txt
with contents username: op://Private/ip1/credentials_id, password: op://Private/ip1/credentials_pass
, and then running op inject -i 'retrieveCreds.txt'
two times. The first time the secret reference for the actual SharedCredentials
will be written in retrieveCreds.txt
, and the second time around the actual credentials will be there. This would result into not concerning yourself with updating the credentials to each individual smaller item. Because they all reference the same item, you could just update the credentials in the SharedCredentials
.
Hope this helps,
Andi