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

www is being added to API endpoint #3703

Open
ay0o opened this issue Feb 7, 2025 · 3 comments
Open

www is being added to API endpoint #3703

ay0o opened this issue Feb 7, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@ay0o
Copy link

ay0o commented Feb 7, 2025

Describe the bug
When I try to configure a runner with a registration token generated with either a GitHub App or a PAT, a www is added to the middle of the endpoint. Instead of api.github.com, it becomes api.www.github.com.

However, if I use the token generated by GitHub when manually going to a repo and hitting the New self-hosted runner button, it works.

To make things more weird, if we ignore the configuration and just run the run.sh --check, the same happens.

For example:

2025-02-07T11:03:22.6743857Z ***************************************************************************************************************
2025-02-07T11:03:22.6743878Z ****                                                                                                       ****
2025-02-07T11:03:22.6743881Z ****     Try DNS lookup for api.www.github.com
2025-02-07T11:03:22.6743893Z ****                                                                                                       ****
2025-02-07T11:03:22.6743897Z ***************************************************************************************************************
2025-02-07T11:03:22.6796296Z ***************************************************************************************************************
2025-02-07T11:03:22.6796319Z ****                                                                                                       ****
2025-02-07T11:03:22.6796338Z ****     Resolved DNS for api.www.github.com failed with error: System.Net.Sockets.SocketException (00000005, 0xFFFDFFFF): Name or service not known

I have tried both Ubuntu and Amazon Linux

To Reproduce

  1. Launch an EC2
  2. Download the runner software
  3. Run the checker. ./run.sh --check --url ... --pat ...

Expected behavior
Correct endpoints used

Runner Version and Platform

2.322.0

Amazon Linux and Ubuntu 24.04

@ay0o ay0o added the bug Something isn't working label Feb 7, 2025
@ay0o
Copy link
Author

ay0o commented Feb 7, 2025

oh, found the root cause for this.

It's because I was using as URL https://www.github.com/owner/repo.

I would say this is not ok. If the tool expects to connect to api.github.com, it shouldn't matter whether the URL is passed as either github.com or www.github.com, don't you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@ay0o and others