acmesh-official / acme.sh

A pure Unix shell script implementing ACME client protocol
https://acme.sh
GNU General Public License v3.0
38.77k stars 4.92k forks source link

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

Closed ILikePhysics closed 1 week ago

ILikePhysics commented 3 months ago

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
github-actions[bot] commented 3 months ago

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.

Neilpang commented 3 months ago

I just added PROJECT_API for you.

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

ILikePhysics commented 3 months ago

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

ILikePhysics commented 3 months ago

Removed

ILikePhysics commented 3 months ago

@Neilpang Thanks, that is exactly what I need.