JetBrains Space Help

Authenticate in Space Packages

Space Packages is a package repository manager built into Space. You can use it to store packages produced by your Automation build scripts.

For authentication in Packages and other Space modules, Automation uses a separate Automation Service account. To authenticate your build script, use the client ID and client secret issued to the Automation Service. In a container, the ID and secret are available as environment variables: JB_SPACE_CLIENT_ID and JB_SPACE_CLIENT_SECRET.

For example, to authenticate a script in a NuGet feed:

job("Authenticate in NuGet feed") { container(image = "mcr.microsoft.com/dotnet/core/sdk:3.1"){ env["FEED_URL"] = "https://nuget.pkg.jetbrains.space/mycompany/p/pkey/mynuget/v3/index.json" shellScript { content = """ dotnet nuget add source ${'$'}FEED_URL -n space -u "${'$'}JB_SPACE_CLIENT_ID" -p "${'$'}JB_SPACE_CLIENT_SECRET" --store-password-in-clear-text """ } } }
Last modified: 18 August 2021