tj5527
November 22, 2017, 11:56am
1
I want to exploit github as private maven repo for personal use. However, when publishing packaged artifact sbt complains
java.io.IOException: Access to URL ... was refused by the server: Forbidden
My build.sbt content
publishTo := Some("Github Repo" at "https://github.com/myaccount/mvn-repo")
credentials += Credentials("Github Repo Manager", "host", "user", "pass")
Searching on the internet and scala user forum do not find solution. How can I publish artifact jar file to github using SBT?
Thanks
curoli
November 22, 2017, 3:10pm
2
Could that be because GitHub is not an artefact repository?
tj5527
November 22, 2017, 4:33pm
3
I think so. But seemingly it’s doable because I find some people use it that way
https://janzhou.org/2015/10/29/use-sbt-and-git-to-create-your-own-maven-repository.html
But it’s not clear how it’s done as the article only mentions local repos which always works without a problem.
If following that article to use github’s githubusercontent
publishTo := Some("Githut Release" at "https://raw.githubusercontent.com/<account>/<project-name>/release")
sbt complains java.io.IOException: PUT operation to URL ... failed with status code 400: Bad Request
curoli
November 22, 2017, 4:55pm
4
They just make remote copies of their local artefact repo by putting it
inside a Git repo and then make remote copies of the Git repo with the
artefact repo inside to be used locally.
This is different from having a remote artefact server.
nafg
November 24, 2017, 1:38am
5
Easiest is to use bintray but if you need private, you can use Amazon S3
(needs an sbt plugin)