Be sure to check out the Wiki as well to get help setting up your development environment.
Below is a short explanation on how to create a GitHub Personal Access token to download the dependencies
Follow these steps:
- Log in to your GitHub account and navigate to Settings.
- In the left sidebar, click on "Developer settings" and then select "Fine-grained tokens" under "Personal access tokens".
- Click on "Generate new token".
- Provide a descriptive name for your token in the "Token name" field.
- Set an expiration date for the token.
- Click "Generate token" at the bottom of the page.
- Copy the generated token immediately and store it securely, as you won't be able to see it again.
Once you have your personal access token, you can use it to authenticate and download the Maven packages.
The referenced example plugin project can be found here
- Navigate to the build.gradle.kts file
- Look for the following code block:
maven {
url = uri("https://maven.pkg.github.com/stormsoftwarenet/storm2-public-sdk")
authentication {
create<BasicAuthentication>("basic")
}
credentials {
username = ""
password = System.getenv("GITHUB_PACKAGES_PAT")
}
}
- Either store the token you have just created in an Environment Variable called
GITHUB_PACKAGES_PAT, OR replace theSystem.getenv("GITHUB_PACKAGES_PAT")with your token as a string. (NOT RECOMMENDED!)
Your IDE will now download the dependencies when needed, before compilation.
Javadocs can be found here
Why is gradle showing Received status code 401 from server: unauthorized / Received status code 403 from server: forbidden when building my plugins?
- You may be experiencing an issue with your Fine-Grained access token. Repeat step 2 but create a
Tokens (classic)PAT instead withread:packagesenabled.
