sbt-github-packages
sbt-github-packages copied to clipboard
401 for URL error - Github actions
I am trying to publish my project and encountering a 401 error.
I have followed all the combinations to arrive to the solution but none works.
I followed the instructions from this issue https://github.com/djspiewak/sbt-github-packages/issues/5
I replaced the githubTokenSource := TokenSource.Environment("MY_TOKEN")
with
credentials +=
Credentials(
"GitHub Package Registry",
"maven.pkg.github.com",
"pawanaraballi",
sys.env.getOrElse("MY_TOKEN", "N/A")
))
I tried using the local push by creating the credentials file and trying to push(didn't work).
I am using the latest release of 0.5.2
.
I am following this medium post.
My intellij doesn't resolve githubOwner
and githubRepository
.
My current build.sbt
ThisBuild / scalaVersion := "2.13.0"
ThisBuild / version := "0.0.1"
ThisBuild / organization := "net.pawanaraballi"
val GlobalSettingsGroup: Seq[Setting[_]] = Seq(
githubOwner := "pawanaraballi",
githubRepository := "parse-gitignore",
githubTokenSource := TokenSource.Environment("MY_TOKEN"),
credentials +=
Credentials(
"GitHub Package Registry",
"maven.pkg.github.com",
"pawanaraballi",
sys.env.getOrElse("MY_TOKEN", "N/A")
))
lazy val root = (project in file("."))
.settings(
name := "parse-gitignore",
libraryDependencies ++= Seq(
Dependencies.Ext.libSlf4jApi,
Dependencies.Ext.scalaTest
),
crossScalaVersions := Seq("2.13.0", "2.12.8", "2.11.12", "2.10.7"),
homepage := Some(url("https://github.com/pawanaraballi/parse-gitignore")),
licenses := Seq("MIT License" -> url("http://www.opensource.org/licenses/mit-license.php"))
)
.settings(GlobalSettingsGroup)