Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

which-remote-url-should-i-use.md 5.1 KB

You have to be logged in to leave a comment. Sign In
title redirect_from intro versions
Which remote URL should I use? [/articles/which-url-should-i-use/ /articles/which-remote-url-should-i-use] There are several ways to clone repositories available on {% data variables.product.product_location %}. [{free-pro-team *} {enterprise-server *} {github-ae *}]

When you view a repository while signed in to your account, the URLs you can use to clone the project onto your computer are available below the repository details:

For information on setting or changing your remote URL, see "Changing a remote's URL."

Cloning with HTTPS URLs

The https:// clone URLs are available on all repositories, regardless of visibility. https:// clone URLs work even if you are behind a firewall or proxy.

When you git clone, git fetch, git pull, or git push to a remote repository using HTTPS URLs on the command line, Git will ask for your {% data variables.product.product_name %} username and password. {% data reusables.user_settings.password-authentication-deprecation %}

{% data reusables.command_line.provide-an-access-token %}

{% tip %}

Tips:

{% endtip %}

{% if currentVersion == "free-pro-team@latest" %}If you'd rather use SSH but cannot connect over port 22, you might be able to use SSH over the HTTPS port. For more information, see "Using SSH over the HTTPS port."{% endif %}

Cloning with SSH URLs

SSH URLs provide access to a Git repository via SSH, a secure protocol. To use these URLs, you must generate an SSH keypair on your computer and add the public key to your {% data variables.product.product_name %} account. For more information, see "Connecting to {% data variables.product.prodname_dotcom %} with SSH."

When you git clone, git fetch, git pull, or git push to a remote repository using SSH URLs, you'll be prompted for a password and must provide your SSH key passphrase. For more information, see "Working with SSH key passphrases."

{% if currentVersion == "free-pro-team@latest" %}If you are accessing an organization that uses SAML single sign-on (SSO), you must authorize your SSH key to access the organization before you authenticate. For more information, see "About authentication with SAML single sign-on" and "Authorizing an SSH key for use with SAML single sign-on."{% endif %}

{% tip %}

Tip: You can use an SSH URL to clone a repository to your computer, or as a secure way of deploying your code to production servers. You can also use SSH agent forwarding with your deploy script to avoid managing keys on the server. For more information, see "Using SSH Agent Forwarding."

{% endtip %}

{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.19" or currentVersion == "github-ae@latest" %}

Cloning with {% data variables.product.prodname_cli %}

You can also install {% data variables.product.prodname_cli %} to use {% data variables.product.product_name %} workflows in your terminal. For more information, the {% data variables.product.prodname_cli %} documentation.

{% endif %}

{% if currentVersion != "github-ae@latest" %}

Cloning with Subversion

You can also use a Subversion client to access any repository on {% data variables.product.prodname_dotcom %}. Subversion offers a different feature set than Git. For more information, see "What are the differences between Subversion and Git?"

You can also access repositories on {% data variables.product.prodname_dotcom %} from Subversion clients. For more information, see "Support for Subversion clients." {% endif %}

Further reading

Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...