question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automatically creating a server called `github` can cause surprising errors

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jcansdalecommented, May 24, 2020

@joschi,

My unscientific guess is, that this is the behavior helping the majority of all users and shouldn’t be changed in order to avoid friction for the majority’s use case.

What I don’t understand it how a user would know that the following action will create a server called github with blank credentials?

- uses: actions/setup-java@v1
    with:
        java-version: 1.8

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.

0reactions
maxim-lobanovcommented, Apr 8, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

404 error when creating files using github_repository_file ...
The repositories are created. The .gitignore file fails with the following error: Error: unexpected status code: 404 Not Found.
Read more >
Configuring code scanning - GitHub Docs
You can configure how GitHub scans the code in your project for vulnerabilities and errors.
Read more >
Troubleshooting cloning errors - GitHub Docs
HTTPS cloning errors. There are a few common errors when using HTTPS with Git. These errors usually indicate you have an old version...
Read more >
Cargo build failed with spurious network error #6513 - GitHub
I try git clone and curl https://github.com/rust-lang and they works fine. On my computer github.com can be accessed successfully, I have search ...
Read more >
Workflow syntax for GitHub Actions
You must create a YAML file to define your workflow configuration. ... To automatically trigger a workflow, use on to define which events...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found