Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
5.0 KiB
title, redirect_from, intro, versions
| title | redirect_from | intro | versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Which remote URL should I use? |
|
There are several ways to clone repositories available on {{ site.data.variables.product.prodname_dotcom }}. |
|
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, public and private. These 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 {{ site.data.variables.product.product_name }} username and password. {{ site.data.reusables.user_settings.password-authentication-deprecation }}
{{ site.data.reusables.command_line.provide-an-access-token }}
{% tip %}
Tips:
-
You can use a credential helper so Git will remember your {{ site.data.variables.product.prodname_dotcom }} credentials every time it talks to {{ site.data.variables.product.prodname_dotcom }}. For more information, see "Caching your {{ site.data.variables.product.prodname_dotcom }} credentials in Git."
-
To clone a repository without authenticating to {{ site.data.variables.product.product_name }} on the command line, you can use {{ site.data.variables.product.prodname_desktop }} to clone instead. For more information, see "Cloning a repository from {{ site.data.variables.product.prodname_dotcom }} to {{ site.data.variables.product.prodname_dotcom }} Desktop."
{% 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 {{ site.data.variables.product.product_name }} account. For more information, see "Connecting to {{ site.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" %}
Cloning with {{ site.data.variables.product.prodname_cli }}
You can also install {{ site.data.variables.product.prodname_cli }} to use {{ site.data.variables.product.product_name }} workflows in your terminal. For more information, the {{ site.data.variables.product.prodname_cli }} documentation.
{% endif %}
Cloning with Subversion
You can also use a Subversion client to access any repository on {{ site.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 {{ site.data.variables.product.prodname_dotcom }} from Subversion clients. For more information, see "Support for Subversion clients."
Further reading
- Working with Remotes from the Pro Git book site