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's avatar
Former Member
3 years ago

Couldn't connect to the sign-in address you provided

Hi
I am trying with CLI (version 2.0.0) on GCP cloud run and getting below error
Couldn't connect to the sign-in address you provided. Check the address and your network connection, then try again
No accounts configured for use with 1Password CLI.
You can either:
- Sign in with biometric unlock; see https://developer.1password.com/docs/cli/get-started/#sign-in for details.
- - Add an account manually with op account add; see op account add --help for details.

I am trying command

eval$(echo "password" | op account add --signin --address xyz.1password.com --email myemail@xyz.com --secret-key A5T-)

This is working perfectly fine when I run it on local mac machine with OP CLI .


1Password Version: 2.0.0
Extension Version: 2.0.0
OS Version: GCP Cloud Run
Referrer: forum-search:Couldn't connect to the sign-in address you provided

  • Former Member's avatar
    Former Member

    Hi
    I confirmed the signin address its correct one , mycompanyname.1password.com
    Strange thing is everything works on local mac system but when I deploy this to GCP cloud run it fails when running op add account

    I tried lot of times with different options but no luck.

    How I am using this
    I have one node js application inside I am using op CLI in docker image and creating secure note throgh 1Password API and then to share the secure note link to the person I am using op CLI and for this I am doing 3 steps like this .

    Can you let me know If anything I am doing wrong here ?

    eval $(echo $PAASWORD | op account add --address $ONE_PASSWORD_ADDRESS --email $SA_EMAIL --secret-key $SA_SECRET_KEY )
    eval $(echo $PAASWORD | op signin )
    SHARE_LINK=$(op item share $ITEM_NAME_TO_SHARE --emails=$EMAIL_TO_SHARE --expiry=$EXPIRY_TIME --config );

  • Former Member's avatar
    Former Member

    Thanks for trying that out @avinashdubeyse

    The error logs in particular are very helpful.

    I looked at the code that prints the Couldn't connect to the sign-in address you provided. Check the address and your network connection, then try again. message, and I believe it stems from when the signin-address cannot be reached.

    Is it possible to double check the signin address?

    If that is not the case, do you mind sharing what environment/OS is running in the GCP instance?

  • Former Member's avatar
    Former Member

    I tried command as - eval $(echo $PAASWORD | op account add --signin --address $ONE_PASSWORD_ADDRESS --email $SA_EMAIL --secret-key $SA_SECRET_KEY --config /usr/src/app/utils/onepassword)

  • Former Member's avatar
    Former Member

    Hi
    its the same error ( I tried with config location as - /usr/src/app/utils/onepassword

    Adding here the error log

    2022-04-26 00:50:22.643 CESTUsing configuration at non-standard location "/usr/src/app/utils/onepassword"
    Default
    2022-04-26 00:50:22.643 CEST[ERROR] 2022/04/25 22:46:51 Couldn't connect to the sign-in address you provided. Check the address and your network connection, then try again.
    Default
    2022-04-26 00:50:22.643 CESTUsing configuration at non-standard location "/usr/src/app/utils/onepassword"
    Default
    2022-04-26 00:50:22.643 CEST[ERROR] 2022/04/25 22:47:05 No accounts configured for use with 1Password CLI.
    Default
    2022-04-26 00:50:22.643 CEST
    Default
    2022-04-26 00:50:22.643 CESTYou can either:
    Default
    2022-04-26 00:50:22.643 CEST - Sign in with biometric unlock; see https://developer.1password.com/docs/cli/get-started/#sign-in for details.
    Default
    2022-04-26 00:50:22.643 CEST - Add an account manually with op account add; see op account add --help for details.
    Default
    2022-04-26 00:50:22.643 CESTUsing configuration at non-standard location "/usr/src/app/utils/onepassword"
    Default
    2022-04-26 00:50:22.643 CESTNo accounts configured for use with 1Password CLI.
    Default
    2022-04-26 00:50:22.643 CEST
    Default
    2022-04-26 00:50:22.643 CESTYou can either:
    Default
    2022-04-26 00:50:22.643 CEST - Sign in with biometric unlock; see https://developer.1password.com/docs/cli/get-started/#sign-in for details.
    Default
    2022-04-26 00:50:22.643 CEST - Add an account manually with op account add; see op account add --help for details.

  • Former Member's avatar
    Former Member

    Hey @avinashdubeyse ,

    op stores account info (email, domain, and secret key) in a local (unencrypted) config file.

    By default the config path is set to $HOME/.config/op/config .

    It may be possible that the cloud instance does not allow writes to home dir.

    We do expose the --config PATH flag to manually set the path that the config should be saved to and loaded from. Note that it must be ran on each command.

    So please give the op account add command and subsequent commands with the --config flag and let us know if that works for you.