Automatically creating a server called `github` can cause surprising errors
See original GitHub issueI was setting up a Maven workflow. Everything worked fine locally and I was able to publish using mvn deploy -D token=TOKEN
. When I added the actions/setup-java@v1
action, things mysteriously started to fail.
It turned out it would work as long as my repository wasn’t called github
. You can see the workflow fails when I rename the repository/server from foobarbaz
to github
:
https://github.com/actions-packages-examples/maven-example/commit/b529abbd86131a0da8feb1a3404be5d93d4a63f3
If I user needs to consume any packages, they will need to create a server configuration for every repository they’re consuming packages from. Having a server called github
implicitly defined is likely to get in the way and cause confusion.
Could we make it so that that server-id
needs to be explicitly set and isn’t automatically created?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top GitHub Comments
@joschi,
What I don’t understand it how a user would know that the following action will create a server called
github
with blank credentials?I assumed this action would simply setup Java 1.8.
Using a default server name if credentials are specified would be one thing, but creating a default server with blank credentials when no server or credentials are specified seems surprising! 😕
To put it another way, I don’t understand how creating a creating a default server with blank credentials would help anyone. They won’t be able to publish or consume packages using this server.
Automatic creation of
settings.xml
with github server is intentional and intended for GitHub Package Registry. The necessity of enabling this functionality by default was discussed in https://github.com/actions/setup-java/issues/79 Also this issue contains way to disable it if needs. I will close this issue as duplicate