cloudflare / lua-resty-cookie

Lua library for HTTP cookie manipulations for OpenResty/ngx_lua
347 stars 160 forks source link

Fix Luarocks download failure #50

Closed kikito closed 1 year ago

kikito commented 2 years ago

Currently luarocks install lua-resty-cookie fails with this error:

luarocks install lua-resty-cookie
Installing https://luarocks.org/lua-resty-cookie-0.1.0-1.rockspec
Cloning into 'lua-resty-cookie'...
fatal: remote error:
  The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.

Error: Failed cloning git repository.

This is happening because github is no longer supporting direct-linking to releases using the git:// protocol. The fix is easy - replace with https.

In order to fix this completely someone with the right Luarocks key should do:

luarocks upload rockspecs/lua-resty-cookie-0.1.0-2.rockspec --api-key $KEY

Thanks and have a good day.

curiositycasualty commented 2 years ago

@utix can I ask you to review/merge this?

utix commented 2 years ago

@curiositycasualty This is good for me, but I am not a maintainer of this project. @jdesgats can you merge this ? I can help to maintain this module if you need help. Don't hesitate to add me.

kikito commented 2 years ago

While this gets fixed on each luarock that has this problem, you can use a workaround on your own system by changing how git downloads stuff from github specifically. Luarocks uses git underneath, so this should work:

git config --global url."https://github".insteadOf git://github
acoyfellow commented 1 year ago

Is it possible to get this merged? Looks like it's outstanding a while, but this PR fixes it

curiositycasualty commented 1 year ago

Is it possible to get this merged? Looks like it's outstanding a while, but this PR fixes it

Seems like we are waiting on @jdesgats

utix commented 1 year ago

I have tried via Tobias Rohrle from Cloudflare. Looks like it is abandonned. So I have created a new entry on luarocks and ask to update the root entry

https://github.com/luarocks/luarocks/issues/1504

I will do my best to maintain it, help is welcome.

maurizioabba commented 1 year ago

merged. Apologies folks, there was a problem in the project maintenance. We are not actively making changes to this library, but we are happy to review and merge changes as needed.

hishamhm commented 1 year ago

@maurizioabba Hi, I'm one of the luarocks.org maintainers. Will you upload the new rockspec to luarocks.org (see CLI example in the PR description), or are you willing to handover to @utix the maintenance of the luarocks.org entry? Thanks!

maurizioabba commented 1 year ago

@hishamhm I don't have the luarock key for uploading the version, so I can't do that step. Can you provide me one / point out to a doc for obtaining one please?

We can't pass maintenance of something fetching from CF github space to someone who is not in the CF organization.

utix commented 1 year ago

@maurizioabba it is a personal account from a previous cloudflare guy that was used to publish. The best is to create a cloudflare account on luarocks upload on it and ask @hishamhm to do the modification. I understand you cannot authorize external to interact with your repo, perhaps you can archive it, and a new version from community can live. Looks like there is a couple of person interested to maintain it.

maurizioabba commented 1 year ago

a new version from community can live.

is there one out there? as long as there is a new version already up and running in a different repo, happy to 👍 on the change of link pointed to by luarock (as long as any information about CF is removed)

utix commented 1 year ago

I have forked one here https://github.com/utix/lua-resty-cookie I can remove Cloudflare mention if you ask and just keep name of previous author as they put their personal email

maurizioabba commented 1 year ago

@utix thank you. If you can update https://github.com/utix/lua-resty-cookie/blob/master/rockspecs/lua-resty-cookie-scm-1.rockspec to point to your version and not CF, happy to approve the movement

utix commented 1 year ago

Done @maurizioabba if you agree please confirm to @hishamhm

maurizioabba commented 1 year ago

@hishamhm looks good to me

hishamhm commented 1 year ago

@utix I will redirect the root manifest entry in the luarocks.org repository to your account. Thanks @maurizioabba !

maurizioabba commented 1 year ago

thanks to you all folks for following up on this issue and, in particular, thanks to @utix for maintaining the project!

hishamhm commented 1 year ago

@utix your entry is in the LuaRocks root manifest now, so your latest 0.2.0 is the new default, as will be any new releases you push under your account.