Quando você visualiza um repositório conectado à sua conta, as URLs que podem ser usadas para clonar o projeto no computador ficam disponíveis abaixo dos detalhes do repositório:
Para obter informações sobre como configurar ou alterar URL remota, consulte "Alterar a URL de um remote".
Clonar com URLs de HTTPS (recomendado)
As URLs de clone de https://
estão disponíveis em todos os repositórios, públicos e privados. 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 GitHub Enterprise username and password. Password-based authentication for Git is deprecated, and we recommend using a personal access token (PAT) when prompted for a password instead, which is more secure. Treat your token just like a password. Para obter mais informações, consulte "Criando um token de acesso pessoal."
Dicas:
-
You can use a credential helper so Git will remember your GitHub credentials every time it talks to GitHub. For more information, see "Caching your GitHub credentials in Git."
-
Para clonar um repositório sem autenticar no GitHub Enterprise na linha de comando, use o GitHub Desktop. For more information, see "Cloning a repository from GitHub to GitHub Desktop."
Clonar com URLs de SSH
As URLs de SSH fornecem acesso a um repositório do Git via SSH, um protocolo seguro. To use these URLs, you must generate an SSH keypair on your computer and add the public key to your GitHub Enterprise account. For more information, see "Connecting to GitHub with SSH."
Quando você aplicar git clone
, git fetch
, git pull
ou git push
a um repositório remote usando URLs de SSH, precisará digitar uma senha e a frase secreta da sua chave SSH. Para obter mais informações, consulte "Trabalhar com frases secretas da chave SSH".
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."
Clonar com o Subversion
You can also use a Subversion client to access any repository on GitHub. 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 GitHub from Subversion clients. For more information, see "Support for Subversion clients."
Leia mais
- Working with Remotes from the Pro Git book site