Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode无法登录github账号 #332

Open
1 task done
zhuluzyy opened this issue Aug 9, 2024 · 20 comments
Open
1 task done

vscode无法登录github账号 #332

zhuluzyy opened this issue Aug 9, 2024 · 20 comments
Labels
Bug Something isn't working 等待回复 等待用户回复的问题

Comments

@zhuluzyy
Copy link

zhuluzyy commented Aug 9, 2024

  • 你是否在现有 Issue列表 中搜索过相同问题?

Ⅰ. 请说明操作系统及DS的版本号:

  1. 操作系统:windos 10?
  2. DS版本号:1.8.2?

Ⅱ. 问题描述:

开着ds时用github账号登vscode时,github提示登录成功,vscode弹出"尚未完成授权此扩展使用 GitHub 的操作。是否要尝试其他方式? (本地服务器)"并且保持未登录状态.关闭ds后重试成功(但是巨慢)

Ⅲ. 期望的结果:修复(关着ds上github简直是"耐心是一种美德")

Ⅳ. 如何复现问题?

  1. 保证vscode为未登录状态且以前从未登录过vscode
  2. 打开ds
  3. 用github账号登录vscode

Ⅴ. 请提供相关的错误日志,尽可能的详细:(日志文件在 ${user.home}/.dev-sidecar/logs/ 目录下)

Ⅵ. 有必要时,请提供 ${user.home}/.dev-sidecar/running.json 文件内容:

@zhuluzyy zhuluzyy added the Bug Something isn't working label Aug 9, 2024
@wangliang181230
Copy link
Contributor

麻烦提供下server.log。

@zhuluzyy
Copy link
Author

zhuluzyy commented Aug 9, 2024

@wangliang181230
Copy link
Contributor

你是几点几分操作的啊?日志有点多,我得根据你的操作时间点找日志。

@zhuluzyy
Copy link
Author

zhuluzyy commented Aug 9, 2024

8号下午4点多,具体忘了,我重复尝试登录过很多次

@wangliang181230
Copy link
Contributor

github相关的异常日志倒没有,反倒是 yidian.one 这个域名异常日志一大堆。

@zhuluzyy
Copy link
Author

草莓云客服?(又是什么鬼玩意)

@zhuluzyy
Copy link
Author

8号下午三点13我在https://github.com/zhuluzyy/zhuluzyy/pulls

@zhuluzyy
Copy link
Author

日志里第一次出现yidian.one

@zhuluzyy
Copy link
Author

[2024-08-08T15:13:48.369] [INFO] server - 代理请求: https://yidian.one:443/chrome/info.json GET
[2024-08-08T15:13:48.989] [INFO] server - 代理请求返回: https://github.com:443/zhuluzyy/zhuluzyy 782ms

@zhuluzyy
Copy link
Author

为什么请求的是yidian.one返回的是github.这不会是github加速网站吧?

@zhuluzyy
Copy link
Author

image

@zhuluzyy
Copy link
Author

Visit cloudflare.com for more information.

@zhuluzyy
Copy link
Author

zhuluzyy commented Aug 10, 2024

你是几点几分操作的啊?日志有点多,我得根据你的操作时间点找日志。

image
4:41~4:59

@zhuluzyy
Copy link
Author

我的浏览器装了:
Tiga - Github国内下载和克隆文件加速1.0.0
GitHub加速1.5.10
会不会是冲突?

@zhuluzyy
Copy link
Author

BrowserHistory_2024_8_8.csv.txt
历史记录

@wangliang181230
Copy link
Contributor

wangliang181230 commented Aug 12, 2024

[2024-08-08T15:13:48.369] [INFO] server - 代理请求: https://yidian.one:443/chrome/info.json GET
[2024-08-08T15:13:48.989] [INFO] server - 代理请求返回: https://github.com:443/zhuluzyy/zhuluzyy 782ms
为什么请求的是yidian.one返回的是github.这不会是github加速网站吧?

不是的,这个日志不是按一个请求的顺序来的,多个请求的日志是并行的。所以会混在一起。

@wangliang181230
Copy link
Contributor

wangliang181230 commented Aug 12, 2024

你是几点几分操作的啊?日志有点多,我得根据你的操作时间点找日志。

image
4:41~4:59

找到一个错误日志了:

[2024-08-08T16:44:23.778] [ERROR] server - 代理请求错误 ERR_TLS_CERT_ALTNAME_INVALID Hostname/IP does not match certificate's altnames: Host: baidu.com. is not in the cert's altnames: DNS:github.com, DNS:www.github.com github.com /login/oauth/access_token 143ms
[2024-08-08T16:44:23.779] [ERROR] server - Request error: Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: Host: baidu.com. is not in the cert's altnames: DNS:github.com, DNS:www.github.com
    at new NodeError (node:internal/errors:371:5)
    at Object.checkServerIdentity (node:tls:297:12)
    at TLSSocket.onConnectSecure (node:_tls_wrap:1540:27)
    at TLSSocket.emit (node:events:390:28)
    at TLSSocket._finishInit (node:_tls_wrap:944:8)
    at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12) {
  reason: "Host: baidu.com. is not in the cert's altnames: DNS:github.com, DNS:www.github.com",
  host: 'baidu.com',
  cert: {
    subject: [Object: null prototype] { CN: 'github.com' },
    issuer: [Object: null prototype] {
      C: 'GB',
      ST: 'Greater Manchester',
      L: 'Salford',
      O: 'Sectigo Limited',
      CN: 'Sectigo ECC Domain Validation Secure Server CA'
    },
    subjectaltname: 'DNS:github.com, DNS:www.github.com',
    infoAccess: [Object: null prototype] {
      'CA Issuers - URI': [Array],
      'OCSP - URI': [Array]
    },
    bits: 256,
    pubkey: <Buffer 04 04 4e fc 7a 3d 5d d9 18 d6 a8 7d 98 08 23 39 49 16 99 74 db d3 98 e0 46 e9 4a 72 23 15 06 e2 81 dd 91 de c6 f0 9d ca 88 82 44 71 0c 05 f1 57 a1 98 ... 15 more bytes>,
    asn1Curve: 'prime256v1',
    nistCurve: 'P-256',
    valid_from: 'Mar  7 00:00:00 2024 GMT',
    valid_to: 'Mar  7 23:59:59 2025 GMT',
    fingerprint: 'E7:03:5B:CC:1C:18:77:1F:79:2F:90:86:6B:6C:1D:F8:DF:AA:BD:C0',
    fingerprint256: 'FD:6E:9B:0E:F3:98:BC:D9:04:C3:B2:EC:16:7A:7B:0F:DA:72:01:C9:03:C5:3A:6A:6A:E5:D0:41:43:63:EF:65',
    ext_key_usage: [ '1.3.6.1.5.5.7.3.1', '1.3.6.1.5.5.7.3.2' ],
    serialNumber: '4e28f786b66c1a3b942cd2c40eb742a5',
    raw: <Buffer 30 82 04 a3 30 82 04 49 a0 03 02 01 02 02 10 4e 28 f7 86 b6 6c 1a 3b 94 2c d2 c4 0e b7 42 a5 30 0a 06 08 2a 86 48 ce 3d 04 03 02 30 81 8f 31 0b 30 09 ... 1141 more bytes>,
    issuerCertificate: {
      subject: [Object: null prototype],
      issuer: [Object: null prototype],
      infoAccess: [Object: null prototype],
      bits: 256,
      pubkey: <Buffer 04 79 18 93 ca 9f 6d 9e 6c 57 00 23 05 37 0b 5f 0f 58 5a c4 de 7f 55 a3 e9 1e d6 d9 25 0a 88 a0 20 4a 1d 7a 4f 05 30 8a 63 49 13 8c 64 21 07 95 fd 3a ... 15 more bytes>,
      asn1Curve: 'prime256v1',
      nistCurve: 'P-256',
      valid_from: 'Nov  2 00:00:00 2018 GMT',
      valid_to: 'Dec 31 23:59:59 2030 GMT',
      fingerprint: 'E8:49:90:CB:9B:F8:E3:AB:0B:CA:E8:A6:49:CB:30:FE:4D:C4:D7:67',
      fingerprint256: '61:E9:73:75:E9:F6:DA:98:2F:F5:C1:9E:2F:94:E6:6C:4E:35:B6:83:7C:E3:B9:14:D2:24:5C:7F:5F:65:82:5F',
      ext_key_usage: [Array],
      serialNumber: 'f3644e6b6e0050237e0946bd7be1f51d',
      raw: <Buffer 30 82 03 a8 30 82 03 2e a0 03 02 01 02 02 11 00 f3 64 4e 6b 6e 00 50 23 7e 09 46 bd 7b e1 f5 1d 30 0a 06 08 2a 86 48 ce 3d 04 03 03 30 81 88 31 0b 30 ... 890 more bytes>,
      issuerCertificate: [Object]
    }
  },
  code: 'ERR_TLS_CERT_ALTNAME_INVALID'
}

但是很奇怪,github.com 域名,使用了直连模式,通过修改SNI为 baidu.com 来伪造请求域名,来绕过GFW的,但唯独这个请求 POST:https://github.com/login/oauth/access_token 失败了,不知道原因啊。

要么,你把梯子功能开起来,把拦截里关于github.com的配置去掉,让它走梯子试试吧。

@wangliang181230
Copy link
Contributor

wangliang181230 commented Aug 12, 2024

或者,你试一下在拦截配置里,加一下这个配置看看。
但从理论上来说,这样配置,会间断性的被GFW拦截的,也就是说,一会儿可以用,一会儿不能用。

{
  "github.com": {
    "/login/oauth/access_token": {
      "sni": "github.com"
    }
  }
}

如图:
图片

@wangliang181230
Copy link
Contributor

@zhuluzyy 问题有解决吗?

@wangliang181230 wangliang181230 added the 等待回复 等待用户回复的问题 label Aug 30, 2024
@Nobodies123
Copy link

给你一个我之前应急的办法:关掉ds,只用watt toolkit(原steam++)的steam加速功能,能够登录上去(但是这样访问GitHub会很慢)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working 等待回复 等待用户回复的问题
Projects
None yet
Development

No branches or pull requests

3 participants