Git Address and Authentication Instructions
About 334 wordsAbout 1 min
Git Repository Address
The Git repository address uses the repository page URL directly, without adding a .git suffix:
https://cnb.cool/group-path/repo-path
This is the same URL users see when accessing the repository homepage in a browser. The traditional .git suffix format is also supported, with identical functionality.
Explanation
- Convenience: You can copy the repository URL directly from the browser address bar as the Git address.
- Traditional Format Support: The
.gitsuffix format is also supported. - Consistent Functionality: Both formats support full Git operations (cloning, pulling, and pushing) without any functional differences.
Authentication Method
Authentication is performed via an access token:
- Username: Always enter
cnb. - Password: Enter the access token you have created (supports permission configuration).
For more usage details, please refer to: Access Token.
When connecting with third-party tools (such as IDEs, Git clients), enter the token in the password field and
cnbin the username field.
Design Background
- Tokens support fine-grained permission control (read/write or read-only) and can be revoked or updated at any time, offering higher security compared to static passwords.
- Using the fixed username
cnbsimplifies authentication, preventing security risks from custom username conflicts or weak passwords.
SSH Not Supported
The platform does not support SSH protocol access for the following reasons:
- Higher Security: HTTPS + tokens support short-term validity and hierarchical permissions, making them easier to manage than long-term SSH private keys and revocable at any time.
- Lower Barrier to Entry: No need to generate SSH keys or upload public keys, making it suitable for beginners and temporary collaborators.
- Anti-MITM: The SSH protocol is vulnerable to man-in-the-middle attacks over the public network, as most users do not verify host key fingerprints on first connection. HTTPS's CA trust chain mechanism resolves this issue automatically.