Skip to content

Commit

Permalink
feat: improve login tips and close #37
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme committed Jul 24, 2021
1 parent b16f22b commit 4ae2b0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
| --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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 gitee wechat subscription and bind your account. | 需要短信验证码校验。可以关注 Gitee 微信公众号,并绑定 Gitee 帐号,接收登录提示。[#6](https://github.com/yanglbme/gitee-pages-action/issues/6) |
| 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/advanced-java`,并且严格区分大小写,请准确填写。[#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) 区反馈。 |
Expand Down
10 changes: 5 additions & 5 deletions app/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def login(self):
data=form_data,
timeout=Action.timeout,
verify=False)

# https://assets.gitee.com/assets/encrypt.js
separator = '$gitee$'
data = f'{csrf_token}{separator}{self.password}'
Expand Down Expand Up @@ -113,10 +113,10 @@ def login(self):
'login to validate your account.')
if '"message": "phone_captcha_fail"' in resp.text or \
'当前帐号存在异常登录行为,为确认你的有效身份' in resp.text or \
'一条包含验证码的信息已发送至你的' in resp.text:
raise Exception('Need phone captcha validation, please follow '
'gitee wechat subscription '
'and bind your account.')
'一条包含验证码的信息已发送至你的' in resp.text or \
'A message containing a verification code has been sent to you' in resp.text:
raise Exception('Need phone captcha validation, please follow wechat '
'official account "Gitee" to bind account to turn off authentication.')
if not ('个人主页' in resp.text or
'我的工作台' in resp.text or
'我的工作臺' in resp.text or
Expand Down

0 comments on commit 4ae2b0c

Please sign in to comment.