ConfigLib
ConfigLib copied to clipboard
GitHub authentication problem
Could not transfer artifact de.exlll:configlib-bukkit:pom:2.2.0 from/to de.exlll (https://maven.pkg.github.com/Exlll/ConfigLib): authentication failed for https://maven.pkg.github.com/Exlll/ConfigLib/de/exlll/configlib-bukkit/2.2.0/configlib-bukkit-2.2.0.pom, status: 401 Unauthorized
Hi,
you need to login with your username and a token that has the required permissions. You can generate such a token under Settings -> Developer Settings -> Personal access tokens.
I cant access it too.
Currently, there is no way to access a package from the Github Package Registry without authentication. If you want to download a package that is hosted here on Github, you have to define a repository and provide your credentials.
For Gradle (using Kotlin DSL), first go to your .gradle/gradle.properties
file and add the following two lines where the token is a Github Token which was generated as I described above:
github.actor=<GITHUB USERNAME>
github.token=<GITHUB TOKEN>
Then, you need to define the repository in your build.gradle.kts
and add the dependency:
repositories {
mavenCentral()
// ...
maven {
url = uri("https://maven.pkg.github.com/Exlll/ConfigLib")
credentials {
username = project.findProperty("github.actor") as String?
?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("github.token") as String?
?: System.getenv("GITHUB_TOKEN")
}
}
}
}
dependencies {
implementation("de.exlll:configlib-core:2.2.0")
}
For Maven, you basically have to do the same as described here.
Has there been any progress on alternative solutions?
@Insprill I submitted a request to codemc.io to get access to Nexus almost a month ago. I guess they haven't had time to review this project. Three other people I asked recommended not using jitpack.io. Now I'm thinking about publishing to Maven Central but I'd prefer having a bit more control over the repository. Have you got any other suggestions?
I've only ever used Maven Central, but it's worked great for me. I got approved in a couple of hours and it's very simple to get set up with Gradle and the Nexus Publish Plugin.
@Insprill Using the latest commit, you should now be able to use jitpack.io.
This library is now also published to Maven Central.