{"id":19993561,"url":"https://github.com/fenying/le-alidns","last_synced_at":"2025-05-04T12:31:57.389Z","repository":{"id":152915132,"uuid":"112603604","full_name":"fenying/le-alidns","owner":"fenying","description":"通过阿里云 DNS 为 Let's Encrypt 签发 SSL 证书提供验证的脚本工具。","archived":true,"fork":false,"pushed_at":"2021-03-16T01:56:54.000Z","size":21,"stargazers_count":44,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-13T04:56:49.158Z","etag":null,"topics":["alidns","aliyun","letsencrypt"],"latest_commit_sha":null,"homepage":"https://fenying.net","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fenying.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-30T11:29:01.000Z","updated_at":"2024-11-01T05:40:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1589bf5-e71a-4391-b6f1-93aa0713b5fa","html_url":"https://github.com/fenying/le-alidns","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenying%2Fle-alidns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenying%2Fle-alidns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenying%2Fle-alidns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenying%2Fle-alidns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fenying","download_url":"https://codeload.github.com/fenying/le-alidns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252334745,"owners_count":21731451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alidns","aliyun","letsencrypt"],"created_at":"2024-11-13T04:52:48.497Z","updated_at":"2025-05-04T12:31:57.381Z","avatar_url":"https://github.com/fenying.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# LE-AliDNS\n\n\u003e DEPRECATED: Please use [acme.sh](https://acme.sh) instead.\n\n通过阿里云 DNS 为 Let's Encrypt 签发证书提供验证的脚本工具。\n\n## 功能\n\n-   支持签发多域名证书\n-   支持签发 ACMEv2 的通配符证书（配置开启 `acme-version=v2`）\n\n    \u003e 如果此前使用了 ACMEv1 签发的证书，那么建议在升级前将 /etc/letsencrypt 目录备份\n    \u003e 例如改个名。\n\n-   支持刷新证书\n\n## 使用条件\n\n1. 一台能运行 Certbot 的 Linux/Mac 设备\n2. 安装有 Python 2.7.x (需自行手动安装)\n3. 安装有 Certbot (需自行手动安装)\n4. 要签发（续签）的所有证书，域名都是通过阿里云 DNS 管理的。\n\n## 使用方式\n\n### 安装\n\n使用 Git Clone 仓库，例如：\n\n```sh\nLE_ALIDNS_INSTALL_ROOT=/usr/local\nLE_ALIDNS_DIRNAME=le-alidns\nLE_ALIDNS_ROOT=\"${LE_ALIDNS_INSTALL_ROOT}/${LE_ALIDNS_DIRNAME}\"\ncd $LE_ALIDNS_INSTALL_ROOT\ngit clone https://github.com/fenying/le-alidns.git $LE_ALIDNS_DIRNAME\ncd $LE_ALIDNS_ROOT\nfind '.' -name '*.sh' -exec chmod 0700 {} \\; # 设置 Shell 脚本执行权限\ngit config --local core.filemode false # 忽略该git仓库的文件权限属性改动\n```\n\n### 更新版本\n\n```sh\nLE_ALIDNS_INSTALL_ROOT=/usr/local\nLE_ALIDNS_DIRNAME=le-alidns\nLE_ALIDNS_ROOT=\"${LE_ALIDNS_INSTALL_ROOT}/${LE_ALIDNS_DIRNAME}\"\ncd $LE_ALIDNS_ROOT\ngit config --local core.filemode false\ngit pull\nfind '.' -name '*.sh' -exec chmod 0700 {} \\; # 设置 Shell 脚本执行权限\n```\n\n### 初始化\n\n\u003e 依赖如下组件： (可以通过 initialize-env.sh 自动安装)\n\u003e\n\u003e - Pip\n\u003e - Aliyun CLI 命令行工具\n\u003e - Aliyun AliDNS Python SDK\n\n1.  运行脚本 initialize-env.sh 安装 Python 2.7, PIP, Aliyun-CLI, \n    Aliyun-SDK-AliDNS 等组件，并配置 Access-Key 和 Secret-Key。\n    \u003e Access-Key 需要 AliyunDNSFullAccess 权限。参考：\n    [配置命令行工具和 SDK](https://help.aliyun.com/document_detail/43039.html?spm=a2c4g.11186623.6.550.ap6b0e)。\n\n2.  复制 default.conf 配置文件为 /etc/le-alidns.conf，并根据需要配置。\n\n### 配置 Pip 源\n\n由于某些不可描述的原因，对于在国内使用 Pip 会出现无法下载或者下载极其缓慢的情况。\n这个情况请修改 Pip 配置文件（一般是 `~/.pip/pip.conf`），使用清华大学的源：\n\n\u003e 不要使用阿里云的源。\n\n```ini\n[global]\nindex-url=https://pypi.tuna.tsinghua.edu.cn/simple\n\n[install]\ntrusted-host=pypi.tuna.tsinghua.edu.cn\n```\n\n\u003e 参考：https://github.com/certbot/certbot/issues/2516\n\n### 签发新证书\n\n执行 `sudo /path/to/sign-all.sh` 即可为 domains 里配置的所有域名都签发证书。\n\n### 续签证书\n\n执行 `sudo /path/to/renew-all.sh` 可以续签所有已经签发的证书（包括手动签发的）。\n\n\u003e 执行前使用 `export LEALIDNS_FORCE=1` 可以强制续签证书，但是一般情况请不要使用。\n\n## 作者\n\nAngus.Fenying \u003c[i.am.x.fenying@gmail.com](mailto:i.am.x.fenying@gmail.com)\u003e\n\n## License\n\n本项目基于 [MIT 协议](./LICENSE)开源，可自由使用，如果使用过程中发生任何意外，本人\n不承担任何责任。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenying%2Fle-alidns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffenying%2Fle-alidns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenying%2Fle-alidns/lists"}