Open Katrix opened 6 years ago
The same for me.... gpg in version 1.4.x is used by my update tool (slackpkg on slackware) and I can not override it. Instead of I have gpg2 installed. I need to point to gpg2 only for publishSigned
Work-around:
ln -s /usr/bin/gpg2 $HOME/bin/gpg
PATH=$HOME/bin:$PATH sbt
Probably needs to be scoped globally.
set Global / gpgCommand := "gpg2"
I am still getting this issue. Opened a stackoverflow question in case its me doing something wrong:
@eed3si9n any thoughts?
Let me reopen this issue.
@eed3si9n thx ... is the fix for this simply adding to here:
def gpgCommand = PgpKeys.gpgCommand in Global
I poked at this a bit in the scala-xml repo (as an arbitrary example of a repo that uses this plugin)
sbt:scala-xml> set com.typesafe.sbt.pgp.PgpKeys.gpgCommand := "gpg2"
[info] Defining gpgCommand
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to scala-xml (in build file:/Users/tisue/modules/scala-xml/)
sbt:scala-xml> show gpgCommand
[info] xmlJS / gpgCommand
[info] gpg
[info] xml / gpgCommand
[info] gpg
[info] gpgCommand
[info] gpg2
note that the global setting changed but the value in each subproject didn't
but then:
sbt:scala-xml> set ThisBuild / com.typesafe.sbt.pgp.PgpKeys.gpgCommand := "gpg2"
[info] Defining ThisBuild / gpgCommand
[info] The new value will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to scala-xml (in build file:/Users/tisue/modules/scala-xml/)
sbt:scala-xml> show gpgCommand
[info] xmlJS / gpgCommand
[info] gpg2
[info] xml / gpgCommand
[info] gpg2
[info] gpgCommand
[info] gpg2
this time they all changed.
so maybe you want ThisBuild
rather than Global
?
@SethTisue thanks for taking the time to help with this. Will give your suggestion a try.
For changing command on Travis CI (Ubuntu) we use the next settings:
val gpgSettings = Seq(
useGpgAgent := true,
useGpgPinentry := true,
usePgpKeyHex("XXXXXXX")
) ++ sys.env.get("TRAVIS").map( _ => gpgCommand in Global := "gpg2" )
Trying to make sbt-pgp use gpg2 by changing the gpgCommand key, but it doesn't seem to have any effect.
Using
useGpg := true