-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:Neilpang/acme.sh
- Loading branch information
Showing
14 changed files
with
1,168 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Script to deploy certificate to a Gitlab hosted page | ||
|
||
# The following variables exported from environment will be used. | ||
# If not set then values previously saved in domain.conf file are used. | ||
|
||
# All the variables are required | ||
|
||
# export GITLAB_TOKEN="xxxxxxx" | ||
# export GITLAB_PROJECT_ID=012345 | ||
# export GITLAB_DOMAIN="mydomain.com" | ||
|
||
gitlab_deploy() { | ||
_cdomain="$1" | ||
_ckey="$2" | ||
_ccert="$3" | ||
_cca="$4" | ||
_cfullchain="$5" | ||
|
||
_debug _cdomain "$_cdomain" | ||
_debug _ckey "$_ckey" | ||
_debug _ccert "$_ccert" | ||
_debug _cca "$_cca" | ||
_debug _cfullchain "$_cfullchain" | ||
|
||
if [ -z "$GITLAB_TOKEN" ]; then | ||
if [ -z "$Le_Deploy_gitlab_token" ]; then | ||
_err "GITLAB_TOKEN not defined." | ||
return 1 | ||
fi | ||
else | ||
Le_Deploy_gitlab_token="$GITLAB_TOKEN" | ||
_savedomainconf Le_Deploy_gitlab_token "$Le_Deploy_gitlab_token" | ||
fi | ||
|
||
if [ -z "$GITLAB_PROJECT_ID" ]; then | ||
if [ -z "$Le_Deploy_gitlab_project_id" ]; then | ||
_err "GITLAB_PROJECT_ID not defined." | ||
return 1 | ||
fi | ||
else | ||
Le_Deploy_gitlab_project_id="$GITLAB_PROJECT_ID" | ||
_savedomainconf Le_Deploy_gitlab_project_id "$Le_Deploy_gitlab_project_id" | ||
fi | ||
|
||
if [ -z "$GITLAB_DOMAIN" ]; then | ||
if [ -z "$Le_Deploy_gitlab_domain" ]; then | ||
_err "GITLAB_DOMAIN not defined." | ||
return 1 | ||
fi | ||
else | ||
Le_Deploy_gitlab_domain="$GITLAB_DOMAIN" | ||
_savedomainconf Le_Deploy_gitlab_domain "$Le_Deploy_gitlab_domain" | ||
fi | ||
|
||
string_fullchain=$(_url_encode <"$_cfullchain") | ||
string_key=$(_url_encode <"$_ckey") | ||
|
||
body="certificate=$string_fullchain&key=$string_key" | ||
|
||
export _H1="PRIVATE-TOKEN: $Le_Deploy_gitlab_token" | ||
|
||
gitlab_url="https://gitlab.com/api/v4/projects/$Le_Deploy_gitlab_project_id/pages/domains/$Le_Deploy_gitlab_domain" | ||
|
||
_response=$(_post "$body" "$gitlab_url" 0 PUT | _dbase64 "multiline") | ||
|
||
error_response="error" | ||
|
||
if test "${_response#*$error_response}" != "$_response"; then | ||
_err "Error in deploying certificate:" | ||
_err "$_response" | ||
return 1 | ||
fi | ||
|
||
_debug response "$_response" | ||
_info "Certificate successfully deployed" | ||
|
||
return 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -876,6 +876,7 @@ acme.sh --issue --dns dns_tele3 -d example.com -d *.example.com | |
``` | ||
|
||
The TELE3_Key and TELE3_Secret will be saved in ~/.acme.sh/account.conf and will be reused when needed. | ||
|
||
## 47. Use Euserv.eu API | ||
|
||
First you need to login to your euserv.eu account and activate your API Administration (API Verwaltung). | ||
|
@@ -897,6 +898,98 @@ acme.sh --issue --dns dns_euserv -d example.com -d *.example.com --insecure | |
The `EUSERV_Username` and `EUSERV_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed. | ||
|
||
Please report any issues to https://github.com/initit/acme.sh or to <[email protected]> | ||
|
||
## 48. Use DNSPod.com domain API to automatically issue cert | ||
|
||
First you need to get your API Key and ID by this [get-the-user-token](https://www.dnspod.com/docs/info.html#get-the-user-token). | ||
|
||
``` | ||
export DPI_Id="1234" | ||
export DPI_Key="sADDsdasdgdsf" | ||
``` | ||
|
||
Ok, let's issue a cert now: | ||
``` | ||
acme.sh --issue --dns dns_dpi -d example.com -d www.example.com | ||
``` | ||
|
||
The `DPI_Id` and `DPI_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed. | ||
|
||
## 49. Use Google Cloud DNS API to automatically issue cert | ||
|
||
First you need to authenticate to gcloud. | ||
|
||
``` | ||
gcloud init | ||
``` | ||
|
||
**The `dns_gcloud` script uses the active gcloud configuration and credentials.** | ||
There is no logic inside `dns_gcloud` to override the project and other settings. | ||
If needed, create additional [gcloud configurations](https://cloud.google.com/sdk/gcloud/reference/topic/configurations). | ||
You can change the configuration being used without *activating* it; simply set the `CLOUDSDK_ACTIVE_CONFIG_NAME` environment variable. | ||
|
||
To issue a certificate you can: | ||
``` | ||
export CLOUDSDK_ACTIVE_CONFIG_NAME=default # see the note above | ||
acme.sh --issue --dns dns_gcloud -d example.com -d '*.example.com' | ||
``` | ||
|
||
`dns_gcloud` also supports [DNS alias mode](https://github.com/Neilpang/acme.sh/wiki/DNS-alias-mode). | ||
|
||
## 50. Use ConoHa API | ||
|
||
First you need to login to your ConoHa account to get your API credentials. | ||
|
||
``` | ||
export CONOHA_Username="xxxxxx" | ||
export CONOHA_Password="xxxxxx" | ||
export CONOHA_TenantId="xxxxxx" | ||
export CONOHA_IdentityServiceApi="https://identity.xxxx.conoha.io/v2.0" | ||
``` | ||
|
||
To issue a cert: | ||
``` | ||
acme.sh --issue --dns dns_conoha -d example.com -d www.example.com | ||
``` | ||
|
||
The `CONOHA_Username`, `CONOHA_Password`, `CONOHA_TenantId` and `CONOHA_IdentityServiceApi` will be saved in `~/.acme.sh/account.conf` and will be reused when needed. | ||
|
||
## 51. Use netcup DNS API to automatically issue cert | ||
|
||
First you need to login in your CCP account to get your API Key and API Password. | ||
``` | ||
export NC_Apikey="<Apikey>" | ||
export NC_Apipw="<Apipassword>" | ||
export NC_CID="<Customernumber>" | ||
``` | ||
|
||
Now, let's issue a cert: | ||
``` | ||
acme.sh --issue --dns dns_netcup -d example.com -d www.example.com | ||
``` | ||
|
||
The `NC_Apikey`,`NC_Apipw` and `NC_CID` will be saved in `~/.acme.sh/account.conf` and will be reused when needed. | ||
|
||
## 52. Use GratisDNS.dk | ||
|
||
GratisDNS.dk (https://gratisdns.dj/) does not provide an API to update DNS records (other than IPv4 and IPv6 | ||
dynamic DNS addresses). The acme.sh plugin therefore retrieves and updates domain TXT records by logging | ||
into the GratisDNS website to read the HTML and posting updates as HTTP. The plugin needs to know your | ||
userid and password for the GratisDNS website. | ||
|
||
```sh | ||
export GDNSDK_Username="..." | ||
export GDNSDK_Password="..." | ||
``` | ||
The username and password will be saved in `~/.acme.sh/account.conf` and will be reused when needed. | ||
|
||
|
||
Now you can issue a certificate. | ||
|
||
```sh | ||
acme.sh --issue --dns dns_gdnsdk -d example.com -d *.example.com | ||
``` | ||
|
||
# Use custom API | ||
|
||
If your API is not supported yet, you can write your own DNS API. | ||
|
@@ -917,4 +1010,4 @@ See: https://github.com/Neilpang/acme.sh/wiki/DNS-API-Dev-Guide | |
|
||
# Use lexicon DNS API | ||
|
||
https://github.com/Neilpang/acme.sh/wiki/How-to-use-lexicon-dns-api | ||
https://github.com/Neilpang/acme.sh/wiki/How-to-use-lexicon-dns-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.