FAQ

git clone 不下来,要什么 personal access token

问题:

$ git clone https://git.tsinghua.edu.cn/daizy19/decaf-java-19.git
Cloning into 'decaf-java-19'...
Username for 'https://git.tsinghua.edu.cn': x
Password for 'https://x@git.tsinghua.edu.cn':
remote: HTTP Basic: Access denied
remote: You must use a personal access token with 'api' scope for Git over HTTP.
remote: You can generate one at https://git.tsinghua.edu.cn/profile/personal_access_tokens
fatal: Authentication failed for 'https://git.tsinghua.edu.cn/daizy19/decaf-java-19.git/'
  1. 重新执行 git clone 命令,你需要 clone 的 url 是 git clone https://oauth2:令牌@git.tsinghua.edu.cn/compiler-19/decaf-学号.git,其中令牌是刚刚那个的 personal access token。

    $ git clone https://oauth2:cnxKrqTDoyXhUzZBMEgG@git.tsinghua.edu.cn/daizy19/decaf-java-19.git
    Cloning into 'decaf-java-19'...
    remote: Counting objects: 1144, done.
    remote: Compressing objects: 100% (507/507), done.
    remote: Total 1144 (delta 620), reused 927 (delta 518)
    Receiving objects: 100% (1144/1144), 276.05 KiB | 1.18 MiB/s, done.
    Resolving deltas: 100% (620/620), done.

Last updated