Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private Github Repo & Github Maven Packages support #2391

Open
Tuchan opened this issue Nov 3, 2024 · 0 comments
Open

Private Github Repo & Github Maven Packages support #2391

Tuchan opened this issue Nov 3, 2024 · 0 comments
Labels
feature: creator status: accepted This is a high-priority feature or a reproduced bug type: enhancement

Comments

@Tuchan
Copy link

Tuchan commented Nov 3, 2024

Minecraft Development for IntelliJ plugin version

2024.2-1.8.2

Description of the feature request

Custom templates are very useful, but they come with the drawback that everything needs to be accessible via a public link. For teams working on larger servers, this isn’t an ideal solution. To address this, I propose two enhancements:

  • Support for private organization repositories in remote templates
  • Support for private organization maven.pkg.github.com/.../maven-metadata.xml links

Private Repositories

A new GitHub option would appear in the template repositories dropdown menu, allowing you to select it as an additional provider. This selection would require authentication with your GitHub account, either through a web pop-up or by entering a token. From there, you could paste a direct link to a zip file or folder hosted in the repository. Additionally, there would be an option to enable automatic updates, similar to how it works with the remote provider.

Private GitHub Packages Versions

If you're unfamiliar with GitHub Packages, learn more here. Since MavenArtifactVersionCreatorProperty.kt is available, it could be used to select the latest version automatically, eliminating the need for constant template updates.

The challenge is that when using GitHub Packages within an organization, the maven-metadata.xml file isn’t publicly accessible. Attempting to use a URL like https://maven.pkg.github.com/OWNER/REPOSITORY/org/example/project/maven-metadata.xml will fail to load...

loading

This happens because the site requires you to log in with your Username and Token:

login

To make private packages work, you need to authenticate with a token in .m2/settings.xml. What if Minecraft Development for IntelliJ could utilize this authentication data? When it detects a GitHub Maven repository link, it could automatically attempt to authenticate using the credentials stored in settings.xml, allowing for fully private developement within an organization.

@RedNesto RedNesto added status: accepted This is a high-priority feature or a reproduced bug feature: creator and removed status: unverified Needs triage labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: creator status: accepted This is a high-priority feature or a reproduced bug type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants