Git Address and Authentication Instructions
About 436 wordsAbout 1 min
Git Address and Authentication explains the repository address format and credentials to use when cloning and pushing code.
When to use: when cloning, pulling, or pushing a CNB repository — for example running git clone in a terminal, configuring a remote repository in an IDE, or pulling code without a password in a script.
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 used for the repository homepage in a browser.
- Copy and use: copy the URL from the browser address bar and use it as the Git address.
- Consistent functionality: both formats support full Git operations, with no differences.
Authentication Method
Authentication is performed via an access token:
- Username: always enter
cnb. - Password: enter an access token you have created.
See Access Token for creating a token and configuring its permissions.
Tips
When connecting with third-party tools (such as IDEs or Git clients), enter cnb in the username field and the access token in the password field.
Command Examples
The example below shows the complete workflow of cloning and pushing code with an access token:
# 1. Clone the repository (you will be prompted for credentials if it is private)
git clone https://cnb.cool/group-path/repo-path
cd repo-path
# 2. Commit and push changes
git add .
git commit -m "feat: init"
git push origin mainTips
When prompted for credentials, enter cnb as the username and your access token as the password.
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.