acme.sh icon indicating copy to clipboard operation
acme.sh copied to clipboard

Feature: Please allow redefining github api URL for upgrades when behind proxy

Open ILikePhysics opened this issue 1 year ago • 5 comments

I am currently running acme.sh on VMs that cannot access the internet. For install packages and installation file, they need to go through a Nexus repository.

For auto-upgrade to work, I would need to be able to redefine the github api url using a env variable in order to go through my nexus proxy server.

For instance,

_hash_url="https://api.github.com/repos/acmesh-official/$PROJECT_NAME/git/refs/$_hash_path"

Could be changed to:

ACME_SOURCE_URL=https://api.github.com/repos/acmesh-official
_hash_url="$ACME_SOURCE_URL/$PROJECT_NAME/git/refs/$_hash_path"

I would then be able to redefine this env variable as such:

ACME_SOURCE_URL=https://nexus.internal/repository/acme.sh

My nexus server repository would be configured as follow:

https://nexus.internal/repository/acme.sh -> https://api.github.com/repos/acmesh-official

ILikePhysics avatar Jun 07 '24 02:06 ILikePhysics

Please upgrade to the latest code and try again first. Maybe it's already fixed. acme.sh --upgrade If it's still not working, please provide the log with --debug 2, otherwise, nobody can help you.

github-actions[bot] avatar Jun 07 '24 02:06 github-actions[bot]

I just added PROJECT_API for you.

please upgrade to the latest dev branch code and try again.

Neilpang avatar Jun 17 '24 13:06 Neilpang

Thanks, will try it out whenever I have a chance and let you know!

ILikePhysics avatar Jun 18 '24 13:06 ILikePhysics

Removed

ILikePhysics avatar Jun 24 '24 12:06 ILikePhysics

@Neilpang Thanks, that is exactly what I need.

ILikePhysics avatar Jun 26 '24 12:06 ILikePhysics