We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For all the developers outhere, GitLab now supports sbt push/pull natively, see: https://gitlab.com/gitlab-org/gitlab/-/issues/408479
object Registry { val credentials: Credentials = sys.env .get("CI_JOB_TOKEN") // automatically generated token in the gitlab-ci .map(Credentials("GitLab Packages Registry", "gitlab.com", "gitlab-ci-token", _)) .getOrElse(Credentials(Path.userHome / ".sbt" / ".credentials")) // for local development val additionalResolvers: Seq[MavenRepository] = Seq( "GitLab" at "https://gitlab.com/api/v4/projects/<PROJECT_ID>/packages/maven" ) def publishToGitlab(projectId: Int): Option[MavenRepository] = Some("gitlab" at s"https://gitlab.com/api/v4/projects/$projectId/packages/maven") }
build.sbt:
build.sbt
ThisBuild / resolvers ++= Registry.additionalResolvers ThisBuild / credentials += Registry.credentials ThisBuild / publishTo := Registry.publishToGitlab(37794088) // Gitlab project id
.sbt/.credentials:
.sbt/.credentials
realm=GitLab Packages Registry host=gitlab.com user=Private-Token password=<YOUR-TOKEN>
The text was updated successfully, but these errors were encountered:
Does this work for self-hosted Gitlab instances though? We were not able to use this in such case so we use the plugin instead.
Sorry, something went wrong.
No branches or pull requests
For all the developers outhere, GitLab now supports sbt push/pull natively, see: https://gitlab.com/gitlab-org/gitlab/-/issues/408479
build.sbt
:.sbt/.credentials
:The text was updated successfully, but these errors were encountered: