Open alyashraf97 opened 4 months ago
Please do not post screenshots of text, please copy paste the output properly here.
@vrothberg there has to be a reason for this?
Looks like a misconfiguration of nginx to me.
@vrothberg Why do you think so?
Podman does not map any port to 443. Try running without nginx in between.
@vrothberg do you think I haven't tried that already?
Your example shows it with nginx. Please share a reproducer without.
A friendly reminder that this issue had no activity for 30 days.
Hi, I think I just ran into the same issue.
Context:
I'm running Quay on port 8080 (http) and port 8843 (https) with a self-signed cert.
# Verifying the ports
curl -i http://quay.example.com:8080/v2/
HTTP/1.1 301 Moved Permanently
curl -ik https://quay.example.com:8443/v2/
HTTP/2 401
When I'm using podman login with a specific port to reach the HTTP endpoint. Everything works as expected. The port is used in the connection and can be seen in the errors:
podman login --username example --password example quay.example.com:8080
Error: authenticating creds for "quay.example.com:8080": pinging container registry quay.example.com:8080:
Get "https://quay.example.com:8080/v2/": http: server gave HTTP response to HTTPS client
odman login --username example --password example quay.example.com:9999
Error: authenticating creds for "quay.example.com:9999": pinging container registry quay.example.com:9999:
Get "https://quay.example.com:9999/v2/": dial tcp 127.0.0.1:9999: connect: connection refuse
When I'm using the HTTPS port (8443 in my case) without the --tls-verify
flag it works as expected:
podman login --username example --password example quay.example.com:8443
Error: authenticating creds for "quay.example.com:8443": pinging container registry quay.example.com:8443:
Get "https://quay.example.com:8443/v2/": x509: certificate signed by unknown authority
With --tls-verify
flag set to false podman login uses the port 443 instead however:
podman login --username example --password example --tls-verify=false quay.example.com:8443
Error: authenticating creds for "quay.example.com:8443":
Get "https://quay.example.com/v2/auth?account=example&service=quay.example.com%3A8080":
dial tcp 127.0.0.1:443: connect: connection refused
I dont' yet know where the "8080" in "quay.example.com%3A8080" comes from.
Tested with podman version 3.4.4 and version 5.1.1, same issue. No special config in registries.conf.
Let me know if I should provide further information.
EDIT: Ok I guess nevermind. My Quay's SERVER_HOSTNAME included the port 8080... once I removed it, everythings seems nominal. :facepalm:
podman login -u='example' -p='example' --tls-verify=false quay.example.com:8443
Error: error logging into "quay.example.com:8443": invalid username/password
Issue Description
Podman defaults to port 443 for https regardless of which port is specified in the connection.
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
Describe the results you expected
Not to default to port 443 if the https port is specified
podman info output
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
No
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting