Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Unity Cloud Content Delivery CLI: Error Saving Credentials when using it from SSH session

Discussion in 'Unity Gaming Services General Discussion' started by developer_plus, Nov 29, 2022.

  1. developer_plus

    developer_plus

    Joined:
    Jan 10, 2017
    Posts:
    10
    Hi,
    We have a Jenkins Slave Node managed through SSH session. We have the UCD command line interface installed there and it works when used locally.

    But when we try to use it from an SSH session (the node is itself an SSH server) it just displays the error
    Error saving credentials. Please try again.
    .

    It doesnt work with any command that uses authentication for example
    ucd auth login [OurApiKey]


    Is there any way to solve that right now?
    Maybe manually specifying the credentials storage or something like that?
     
  2. timtunity3d

    timtunity3d

    Unity Technologies

    Joined:
    Oct 1, 2015
    Posts:
    124
    Hi,

    The "ucd auth login" command uses a keychain. The keychain is typically setup in Linux desktop environments automatically, but we've seen similar issues with the sort of stripped-down environments used in CI. We'd recommend in these cases simply running the command prefixed with the UCD_APIKEY variable and your API key (as Jenkins will generally do secret masking in the logs). For instance something like:

    UCD_APIKEY=[YOUR API KEY] ./ucd buckets create [PROJECT ID] MyBucketName
    UCD_APIKEY=[YOUR API KEY] ./ucd entries sync --bucket [BUCKET ID] build/

    If you need to continue with using the 'auth login' route let us know, and we can continue troubleshooting.
     
    developer_plus likes this.
  3. developer_plus

    developer_plus

    Joined:
    Jan 10, 2017
    Posts:
    10
    Perfect. That worked for us.:)