Help Center> CodeArts Repo> User Guide> Cloning or Downloading Code from CodeArts Repo to a Local PC> Using HTTPS to Clone Code from CodeArts Repo to a Local Computer
Updated on 2023-12-06 GMT+08:00

Using HTTPS to Clone Code from CodeArts Repo to a Local Computer

Cloning Code on the Git Bash Client Using HTTPS

This section describes how to use the Git Bash client to clone a repository of CodeArts Repo to a local PC.

The maximum size of a package that can be pushed at a time using HTTPS is 200 MB. If the size is greater than 200 MB, use the SSH mode.

Federated users cannot be bound to email addresses and do not support the HTTPS protocol.

  1. Download and install the Git Bash client.
  2. Configure an HTTPS password.
  3. On the CodeArts Repo homepage, click the name of a repository. On the repository details page displayed, click Clone/Download, click Clone with HTTPS, and copy the repository address.

    If no HTTPS password is available, click HTTPS Password to configure one. For details, see HTTPS Password.

    You can obtain the HTTPS address from URL in the repository list of CodeArts Repo.

  4. Open Git Bash, navigate to the directory where you want to clone the repository, and run the following command. For the first clone, enter the username (account name) and HTTPS password.

    git clone HTTP_download_address

  5. After the username (account name) and HTTPS password are entered, the repository is cloned.
  6. Run the following command to go to the repository directory:

    cd <repository_name>

    You will be taken to the master branch by default.

If the git clone command fails to be executed, locate the fault as follows:

  • Check whether your network can access CodeArts Repo.

    Run the following command on the Git client to test the network connectivity:

    ssh -vT git@**********.com

    If the returned information contains Could not resolve hostname code**********.com: Name or service not known as shown in the following figure, your network is restricted and you cannot access CodeArts Repo. In this case, contact your local network administrator.

  • Check the HTTPS password and reset the password if necessary.
  • Only PCs that enabled the IP address whitelist can be cloned on the Git client.

Cloning Code on the TortoiseGit Client Using HTTPS

This section describes how to use the TortoiseGit client to clone a repository of CodeArts Repo to a local PC.

  1. Download and install the TortoiseGit client.
  2. Configure an HTTPS password.
  3. On the CodeArts Repo homepage, click the name of a repository. On the repository details page displayed, click Clone/Download, click Clone with HTTPS, and copy the repository address.

    If no HTTPS password is available, click HTTPS Password to configure one. For details, see HTTPS Password.

    You can obtain the HTTPS address from URL in the repository list of CodeArts Repo.

  1. Go to the directory where you want to clone the repository, and choose Git Clone... from the right-click menu.

  2. In the dialog box displayed, paste the copied repository address to the URL field and click OK.

  3. If you clone a repository on TortoiseGit for the first time, enter the username and HTTPS password as prompted.
  4. Wait until the clone is complete.

Cloning a Repository on Linux or macOS Using HTTPS

After the environment is configured (see Installing Git for Linux or Installing Git for macOS), the clone operations of the Git client on Linux or macOS are the same as those in Cloning Code on the Git Bash Client Using HTTPS.