Connecting to GitCode Repo Using an Access Token

debug
diary
Author

Guest_1013

Published

2026-07-11

Issue

I was managing this site using git, and wish to use an online private repo to have a backup. Currently, there are 2 largest online git repo hosting sites in China (which are accessible without any special workarounds like GitHub), which are Gitee and GitCode.

I initially wanted to use Gitee, but it only supports LFS for enterprise users. So I turned to GitCode.

However, as I was going to push to the repo, a verification window poped up, asking for a username and a password; my account username and password didn’t work. The error message said:

remote: <CH.00905401> HTTP Basic: Access denied.
remote: The password-based authentication of Git has been removed. Please use your personal access token instead of the password. Request-id is xxx.
fatal: Authentication failed for 'https://gitcode.com/Guest_1013/[repo].git/'

Solution

The solution is actually hinted in the message above. I need to go to personal settings and create an access token.

After the token was created, use the name and the value of the token in the previous verification section, then it worked perfectly.