Skip to content

Commit

Permalink
feat: check if repo owner is authenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme committed Jun 8, 2023
1 parent c895cb4 commit c82c35c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
45 changes: 23 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@

## 入参

| 参数 | 描述 | 是否必传 | 默认值 | 示例 |
|------------------|-------------------|------|----------|---------------------------------|
| `gitee-username` | Gitee 用户名 || - | `yanglbme` |
| `gitee-password` | Gitee 密码 || - | `${{ secrets.GITEE_PASSWORD }}` |
| `gitee-repo` | Gitee 仓库(严格区分大小写) || - | `doocs/leetcode` |
| `branch` | 要部署的分支(分支必须存在) | | `master` | `main` |
| `directory` | 要部署的分支上的目录 || | `src` |
| `https` | 是否强制使用 HTTPS || `true` | `false` |
| 参数 | 描述 | 是否必传 | 默认值 | 示例 |
| ---------------- | ---------------------------- | -------- | -------- | ------------------------------- |
| `gitee-username` | Gitee 用户名 | | - | `yanglbme` |
| `gitee-password` | Gitee 密码 | | - | `${{ secrets.GITEE_PASSWORD }}` |
| `gitee-repo` | Gitee 仓库(严格区分大小写) | | - | `doocs/leetcode` |
| `branch` | 要部署的分支(分支必须存在) | | `master` | `main` |
| `directory` | 要部署的分支上的目录 | | | `src` |
| `https` | 是否强制使用 HTTPS | | `true` | `false` |

## 完整示例

Expand Down Expand Up @@ -149,20 +149,21 @@ Run yanglbme/gitee-pages-action@main

## 错误及解决方案

| # | 错误 | 解决方案 |
|-----|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1 | Error: Wrong username or password, login failed . | 帐号或密码错误,请检查参数 `gitee-username``gitee-password`是否准确配置。 |
| 2 | Error: Need captcha validation, please visit https://gitee.com/login, login to validate your account. | 需要图片验证码校验。可以手动登录 Gitee 官方,校验验证码。 |
| 3 | Error: Need phone captcha validation, please follow wechat official account "Gitee" to bind account to turn off authentication. | 需要短信验证码校验。可以关注 Gitee 微信公众号,并绑定 Gitee 帐号,接收登录提示。[#6](https://github.com/yanglbme/gitee-pages-action/issues/6) |
| 4 | Error: Do not deploy frequently, try again one minute later. | 短期内频繁部署 Gitee Pages 导致,可以稍后再触发自动部署。 |
| 5 | Error: Deploy error occurred, please check your input `gitee-repo`. | `gitee-repo` 参数格式如:`doocs/leetcode`,并且严格区分大小写,请准确填写。[#10](https://github.com/yanglbme/gitee-pages-action/issues/10) |
| 6 | Error: Unknown error occurred in login method, resp: ... | 登录出现未知错误,请在 [issues](https://github.com/yanglbme/gitee-pages-action/issues) 区反馈。 |
| 7 | Error: Rebuild page error, status code: xxx | 更新 Pages 时状态码异常,请尝试再次触发 Action 执行。也可能为 gitee pages 未初始化,第一次需要手动部署 gitee pages。 |
| 8 | Error: HTTPSConnectionPool(host='gitee.com', port=443): Read timed out. (read timeout=6)<br><br>Error: HTTPSConnectionPool(host='gitee.com', port=443): Max retries exceeded with url: /login (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f6c889d42e8>, 'Connection to gitee.com timed out. (connect timeout=6)')) | 网络请求出错,请尝试 Re-run jobs 。[#27](https://github.com/yanglbme/gitee-pages-action/issues/27) |
| 9 | git@github.com: Permission denied (publickey).<br>fatal: Could not read from remote repository.<br>Please make sure you have the correct access rights and the repository exists.. | 先尝试 Re-run job。[#56](https://github.com/yanglbme/gitee-pages-action/issues/56) <br>若仍旧失败,可能是 SSH 公私钥配置有问题,或是使用了带密码的私钥,请参照上文提及的密钥配置步骤进行相应配置。[#29](https://github.com/yanglbme/gitee-pages-action/issues/29) |
| 10 | Hexo Gitee Pages 自动部署站点问题。 | [@No5972](https://github.com/No5972) 详细给出了一种解决方案。[#34](https://github.com/yanglbme/gitee-pages-action/issues/34) |
| 11 | "/root/.ssh/id_rsa": invalid format. | 操作系统环境不同,生成 ssh key 的方式可能有所差别,尝试添加 `-m PEM` 参数试试。[#49](https://github.com/yanglbme/gitee-pages-action/issues/49) |
| ... | ... | ... |
| # | 错误 | 解决方案 |
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | Error: Wrong username or password, login failed . | 帐号或密码错误,请检查参数 `gitee-username``gitee-password`是否准确配置。 |
| 2 | Error: Need captcha validation, please visit https://gitee.com/login, login to validate your account. | 需要图片验证码校验。可以手动登录 Gitee 官方,校验验证码。 |
| 3 | Error: Need phone captcha validation, please follow wechat official account "Gitee" to bind account to turn off authentication. | 需要短信验证码校验。可以关注 Gitee 微信公众号,并绑定 Gitee 帐号,接收登录提示。[#6](https://github.com/yanglbme/gitee-pages-action/issues/6) |
| 4 | Error: Do not deploy frequently, try again one minute later. | 短期内频繁部署 Gitee Pages 导致,可以稍后再触发自动部署。 |
| 5 | Error: Deploy error occurred, please check your input `gitee-repo`. | `gitee-repo` 参数格式如:`doocs/leetcode`,并且严格区分大小写,请准确填写。[#10](https://github.com/yanglbme/gitee-pages-action/issues/10) |
| 6 | Error: Unknown error occurred in login method, resp: ... | 登录出现未知错误,请在 [issues](https://github.com/yanglbme/gitee-pages-action/issues) 区反馈。 |
| 7 | Error: Rebuild page error, status code: xxx | 更新 Pages 时状态码异常,请尝试再次触发 Action 执行。也可能为 gitee pages 未初始化,第一次需要手动部署 gitee pages。 |
| 8 | Error: HTTPSConnectionPool(host='gitee.com', port=443): Read timed out. (read timeout=6)<br><br>Error: HTTPSConnectionPool(host='gitee.com', port=443): Max retries exceeded with url: /login (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f6c889d42e8>, 'Connection to gitee.com timed out. (connect timeout=6)')) | 网络请求出错,请尝试 Re-run jobs 。[#27](https://github.com/yanglbme/gitee-pages-action/issues/27) |
| 9 | Error: The repository owner is not authenticated and is not allowed to deploy pages services. | 仓库持有者未实名认证,不允许部署 pages 服务。 |
| 10 | git@github.com: Permission denied (publickey).<br>fatal: Could not read from remote repository.<br>Please make sure you have the correct access rights and the repository exists.. | 先尝试 Re-run job。[#56](https://github.com/yanglbme/gitee-pages-action/issues/56) <br>若仍旧失败,可能是 SSH 公私钥配置有问题,或是使用了带密码的私钥,请参照上文提及的密钥配置步骤进行相应配置。[#29](https://github.com/yanglbme/gitee-pages-action/issues/29) |
| 11 | Hexo Gitee Pages 自动部署站点问题。 | [@No5972](https://github.com/No5972) 详细给出了一种解决方案。[#34](https://github.com/yanglbme/gitee-pages-action/issues/34) |
| 12 | "/root/.ssh/id_rsa": invalid format. | 操作系统环境不同,生成 ssh key 的方式可能有所差别,尝试添加 `-m PEM` 参数试试。[#49](https://github.com/yanglbme/gitee-pages-action/issues/49) |
| ... | ... | ... |

## 谁在使用

Expand Down

0 comments on commit c82c35c

Please sign in to comment.