YunoHost-Apps / gitea_ynh

Gitea is a fork of Gogs. A git platform, Mirror of https://framagit.org/YunoHost-Apps/gitea_ynh
https://gitea.io
MIT License
22 stars 17 forks source link

Something wrong with registry proxying #72

Closed jukefr closed 1 year ago

jukefr commented 1 year ago

Describe the bug

npm registry does not work anymore and results in ERR_SOCKET_CONNECTION_TIMEOUT on every call Realized this after trying to pull a package from the registry I had published over 4 months ago

Context

Steps to reproduce

  1. Create token in gitea user settings with all package permissions (gitea call it scopes).
  2. Follow steps here https://docs.gitea.com/packages/usage/packages/npm for scoped (different kind of scope, npm nomenclature) login
    npm config set @{user}:registry https://{install_url}/api/packages/{user}/npm/
    npm config set -- '//{install_url}/api/packages/{user}/npm/:_authToken' "{token}"
  3. Try any commands that are implemented by gitea (install, ci, publish, unpublish, dist-tag, view, search) on npm registry and they all fail with socket connection timeout.

Expected behavior

It should just work without a socket timeout. Used to work a couple version ago like at least 4 months ago but couldn't tell you what version that was on. This feels like something was broken in the reverse proxying along the way.

Logs

npm logs:

[...]
npm notice Publishing to https://{install_url}/api/packages/{user}/npm/
npm ERR! code ERR_SOCKET_CONNECTION_TIMEOUT
npm ERR! errno ERR_SOCKET_CONNECTION_TIMEOUT
npm ERR! request to https://{install_url}/api/packages/{user}/npm/@{user}%2f{package_name} failed, reason: Socket connection timeout

Seeing no kinds of logs about this whatsoever in /var/log/gitea/* nor /var/log/nginx/{install_url}/*

And yes everything is fine in yunohost diagnostics

jukefr commented 1 year ago

Issue with vpn on host trying to run the commands apparently oops leaving this as comment and closing if anybody encounters this issue Tried npm, pnpm, yarnv1, yarnv3 they all have the same issue. Only "fix" I have for this is a command that splits my vpn tunnel and bypasses it that i prepend to npm when I'm in a folder using one of the private packages.