Frecuentemente publicamos actualizaciones de nuestra documentación. Es posible que la traducción de esta página esté en curso. Para conocer la información más actual, visita la documentación en inglés. Si existe un problema con las traducciones en esta página, por favor infórmanos.
GitHub AE is currently under limited release. Please contact our Sales Team to find out more.

Cloning a repository

When you create a repository on tu instancia de servidor de GitHub Enterprise, it exists as a remote repository. You can clone your repository to create a local copy on your computer and sync between the two locations.

En este artículo

About cloning a repository

You can clone a repository from tu instancia de servidor de GitHub Enterprise to your local computer to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from tu instancia de servidor de GitHub Enterprise to your local machine.

Cloning a repository pulls down a full copy of all the repository data that tu instancia de servidor de GitHub Enterprise has at that point in time, including all versions of every file and folder for the project. You can push your changes to the remote repository on tu instancia de servidor de GitHub Enterprise, or pull other people's changes from tu instancia de servidor de GitHub Enterprise. For more information, see "Using Git".

You can clone your existing repository or clone another person's existing repository to contribute to a project.

Tip: You can also clone a repository using the CLI de GitHub. For more information, see "gh repo clone" in the CLI de GitHub documentation.

Cloning a repository using the command line

  1. En GitHub Enterprise, visita la página principal del repositorio.

  2. Sobre la lista de archivos, da clic en Código. Botón de "Código"

  3. To clone the repository using HTTPS, under "Clone with HTTPS", click . To clone the repository using an SSH key click Use SSH, then click . El icono de portapapeles para copiar la URL para clonar un repositorio

  1. Abre la TerminalTerminalGit Bash.
  2. Cambia el directorio de trabajo actual a la ubicación en donde quieres clonar el directorio.
  3. Escribe git clone, y luego pega la URL que copiaste antes.
    $ git clone https://nombre de host/YOUR-USERNAME/YOUR-REPOSITORY
  4. Presiona Enter para crear tu clon local.
    $ git clone https://nombre de host/YOUR-USERNAME/YOUR-REPOSITORY
    > Cloning into `Spoon-Knife`...
    > remote: Counting objects: 10, done.
    > remote: Compressing objects: 100% (8/8), done.
    > remove: Total 10 (delta 1), reused 10 (delta 1)
    > Unpacking objects: 100% (10/10), done.

Cloning a repository to GitHub Desktop

  1. En GitHub Enterprise, visita la página principal del repositorio.

  2. Sobre la lista de archivos, da clic en Código. Botón de "Código"

  3. Click Open with GitHub Desktop to clone and open the repository with GitHub Desktop. Botón de "Abrir con GitHub Desktop"

  4. Follow the prompts in GitHub Desktop to complete the clone.

For more information, see "Cloning a repository from GitHub to GitHub Desktop."

Cloning an empty repository

An empty repository contains no files. It's often made if you don't initialize the repository with a README when creating it.

  1. En GitHub Enterprise, visita la página principal del repositorio.

  2. To clone your repository using the command line using HTTPS, under "Quick setup", click . To clone the repository using an SSH key, including a certificate issued by your organization's SSH certificate authority, click SSH, then click . Empty repository clone URL button

    Alternatively, to clone your repository in Desktop, click Set up in Desktop and follow the prompts to complete the clone. Empty repository clone desktop button

  3. Abre la TerminalTerminalGit Bash.

  4. Cambia el directorio de trabajo actual a la ubicación en donde quieres clonar el directorio.

  5. Escribe git clone, y luego pega la URL que copiaste antes.

    $ git clone https://nombre de host/YOUR-USERNAME/YOUR-REPOSITORY
  6. Presiona Enter para crear tu clon local.

    $ git clone https://nombre de host/YOUR-USERNAME/YOUR-REPOSITORY
    > Cloning into `Spoon-Knife`...
    > remote: Counting objects: 10, done.
    > remote: Compressing objects: 100% (8/8), done.
    > remove: Total 10 (delta 1), reused 10 (delta 1)
    > Unpacking objects: 100% (10/10), done.

Troubleshooting cloning errors

When cloning a repository it's possible that you might encounter some errors.

If you're unable to clone a repository, check that:

¿Te ayudó este documento?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

O, learn how to contribute.