How to clone github repository ubuntu

How to clone github repository ubuntu

Search Results

No Results

Filters

How to Install Git and Clone a GitHub Repository

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

GitHub is a website that allows collaboration between developers using the Git version control system. With Git and GitHub, programmers from across the world can share ideas and code in an organized and up-to-date process.

Install and Configure Git

The directions below are for Debian or Ubuntu. For installation on Mac, Windows, or other Linux distributions, find instructions in the Git Source Control Management guide. While that guide focuses on Git, this guide focuses more on Git with GitHub.

Configure the username, replace First Last :

Configure the email, replace example@example.com :

Now that Git has been installed, refer to the image below for help with using Git and GitHub together.

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

Clone a GitHub Test Repository

A repository, or repo, is a Git project. For tutorial purposes, there is a test repository setup on GitHub, which is listed below.

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

Copy the β€œHTTPS clone URL” link using the clipboard icon at the bottom right of the page’s side-bar, pictured below.

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

Change directories to the new

To ensure that your master branch is up-to-date, use the pull command:

Create a GitHub Account and Fork the Test Repo

To share new files or file revisions, you’ll need a GitHub account and a project fork. A fork is a copy of a repo held on your GitHub account.

Create a username on GitHub. At the β€œWelcome to GitHub” page, select the green, β€œFinish sign up” button at the bottom.

Select your username at the top right of the page, pictured below, which links to your profile.

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

You now have a copy of the repo on your GitHub account. Next, return to the terminal of the development Linode.

Push to the Forked Repo

Create files on the development Linode and push them to the forked repository on GitHub.

/test-repo-789 directory, create and checkout a new branch:

Create a project directory:

Create sample files:

Check the status of the Git project, with the git status command:

Add all the files in

/test-repo-789 to the Git staging area:

Push the new files to the forked repo on your new GitHub account. Replace SampleUser1234 below with your own GitHub username, and replace the repo name with the appropriate repo name if different:

Create a Pull Request Against the Original, Previously Cloned Repo

So far, Git was installed on a development Linode, a repo project was cloned to that Linode, a GitHub username was created, and a repo fork was copied to the GitHub user account. The final step is to ask the original repo project to accept the new revisions or sample files. This final process is called a pull request.

From the GitHub browser window, select your username from the top right of the page, pictured below.

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

At your GitHub profile, select the test-repo-789 in the center of the page, pictured below.

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

At the test-repo-789 page, select β€œbranches”.

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

Under β€œYour branches”, select β€œNew pull request”.

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

Check that the branch filters are set correctly.

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

Select the β€œCreate pull request” button.

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

Congratulations, you have used Git and GitHub for file sharing and version control. There are still many Git commands to learn, but you are off to a great start.

More Information

You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.

This page was originally published on Friday, February 6, 2015.

Cloning a repository

In this article

When you create a repository on GitHub.com, 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.

About cloning a repository

You can clone a repository from GitHub.com 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 GitHub.com to your local machine.

Cloning a repository pulls down a full copy of all the repository data that GitHub.com 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 GitHub.com, or pull other people’s changes from GitHub.com. For more information, see «Using Git».

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

Cloning a repository

On GitHub.com, navigate to the main page of the repository.

Above the list of files, click

Copy the URL for the repository.

. How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

Change the current working directory to the location where you want the cloned directory.

Press Enter to create your local clone.

To learn more about GitHub CLI, see «About GitHub CLI.»

You can also use the GitHub URL to clone a repository.

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.

On GitHub.com, navigate to the main page of the repository.

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

Alternatively, to clone your repository in Desktop, click

Change the current working directory to the location where you want the cloned directory.

Press Enter to create your local clone.

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:

Help us make these docs great!

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

Как ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒΡΡ GitHub Π½Π° ΠΊΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€Π΅ с Linux

GitHub β€” ΠΎΠ΄ΠΈΠ½ ΠΈΠ· ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅ΠΌΡ‹Ρ… сСрвисов размСщСния ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ΠΎΠ² для совмСстной Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠΈ. Он ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΈΠ²Π°Π΅Ρ‚ ΠΊΠΎΠ½Ρ‚Ρ€ΠΎΠ»ΡŒ вСрсий, Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡ‚ΡŒ отслСТивания ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ ΠΊΠΎΠ΄Π°, сравнСниС строк, Π° Ρ‚Π°ΠΊΠΆΠ΅ ΠΎΠ½ бСсплатСн.

Π’ Π΄Π°Π½Π½ΠΎΠΉ ΡΡ‚Π°Ρ‚ΡŒΠ΅ ΠΏΡ€ΠΈΠ²Π΅Π΄Π΅Π½Ρ‹ ΠΏΡ€ΠΈΠΌΠ΅Ρ€Ρ‹ использования сСрвиса Π½Π° ΠΊΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€Π΅ ΠΏΠΎΠ΄ ΡƒΠΏΡ€Π°Π²Π»Π΅Π½ΠΈΠ΅ΠΌ ΠΎΠΏΠ΅Ρ€Π°Ρ†ΠΈΠΎΠ½Π½Ρ‹Ρ… систСм сСмСйства Linux. ΠœΡ‹ рассмотрим, ΠΊΠ°ΠΊ ΡΠΎΠ·Π΄Π°Ρ‚ΡŒ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ Π½Π° локальном ΠΊΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€Π΅ ΠΈ Π·Π°Π»ΠΈΡ‚ΡŒ Π΅Π³ΠΎ Π½Π° сСрвис с ΠΏΠΎΠΌΠΎΡ‰ΡŒΡŽ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строки. РассмотрСнныС Π²Π°Ρ€ΠΈΠ°Π½Ρ‚Ρ‹ использования git Ρ‚Π°ΠΊΠΆΠ΅ ΠΌΠΎΠΆΠ½ΠΎ ΠΏΡ€ΠΈΠΌΠ΅Π½ΡΡ‚ΡŒ Π½Π° desktop систСмах, запустив ΠΎΠΊΠ½ΠΎ Ρ‚Π΅Ρ€ΠΌΠΈΠ½Π°Π»Π°.

Установка git

Π£ΠΏΡ€Π°Π²Π»Π΅Π½ΠΈΠ΅ выполняСтся с ΠΏΠΎΠΌΠΎΡ‰ΡŒΡŽ прилоТСния git. Если Π΅Π³ΠΎ Π½Π΅Ρ‚ Π² систСмС, установку ΠΌΠΎΠΆΠ½ΠΎ Π²Ρ‹ΠΏΠΎΠ»Π½ΠΈΡ‚ΡŒ ΠΈΠ· рСпозитория.

Если ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅ΠΌ CentOS / Red Hat:

yum install git-core

Если ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅ΠΌ Ubuntu / Debian:

apt-get install git

Если ΠΌΡ‹ Ρ…ΠΎΡ‚ΠΈΠΌ Π²ΠΎΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒΡΡ сСрвисом с ΠΊΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€Π° Windows ΠΈΠ»ΠΈ Mac OS, Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎ ΡΠΊΠ°Ρ‡Π°Ρ‚ΡŒ ΠΈ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ desktop Π²Π΅Ρ€ΡΠΈΡŽ с ΠΎΡ„ΠΈΡ†ΠΈΠ°Π»ΡŒΠ½ΠΎΠ³ΠΎ сайта.

Бинтаксис

ΠšΠΎΠΌΠ°Π½Π΄Ρ‹ ΠΈΠΌΠ΅ΡŽΡ‚ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠΉ синтаксис:

* ΠΏΠΎΠ»Π½Ρ‹ΠΉ ΠΏΠ΅Ρ€Π΅Ρ‡Π΅Π½ΡŒ ΠΎΠΏΡ†ΠΈΠΉ, ΠΊΠΎΠΌΠ°Π½Π΄ ΠΈ Π°Ρ€Π³ΡƒΠΌΠ΅Π½Ρ‚ΠΎΠ² ΠΌΠΎΠΆΠ½ΠΎ ΠΏΠΎΠ»ΡƒΡ‡ΠΈΡ‚ΡŒ ΠΊΠΎΠΌΠ°Π½Π΄ΠΎΠΉ man git.

Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° Π½Π° локальном ΠΊΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€Π΅

ΠŸΡ€Π΅ΠΆΠ΄Π΅ Ρ‡Π΅ΠΌ ΠΎΡ‚ΠΏΡ€Π°Π²ΠΈΡ‚ΡŒ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ Π½Π° GitHub, создаСм Π΅Π³ΠΎ Π½Π° нашСм ΠΊΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€Π΅. Для этого ΠΏΠ΅Ρ€Π΅Ρ…ΠΎΠ΄ΠΈΠΌ Π² ΠΊΠ°Ρ‚Π°Π»ΠΎΠ³ с Ρ„Π°ΠΉΠ»Π°ΠΌΠΈ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°:

Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·ΠΈΡ€ΡƒΠ΅ΠΌ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ для git:

ΠœΡ‹ ΠΏΠΎΠ»ΡƒΡ‡ΠΈΠΌ ΠΎΡ‚Π²Π΅Ρ‚ ΠΏΠΎΡ…ΠΎΠΆΠΈΠΉ Π½Π°:

Initialized empty Git repository in /projects/.git/

Π­Ρ‚ΠΎ ΠΎΠ·Π½Π°Ρ‡Π°Π΅Ρ‚, Ρ‡Ρ‚ΠΎ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ git создан.

Π’Π΅ΠΏΠ΅Ρ€ΡŒ Π΄ΠΎΠ±Π°Π²ΠΈΠΌ Ρ„Π°ΠΉΠ»Ρ‹ Π² Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ:

* Π΄Π°Π½Π½ΠΎΠΉ ΠΊΠΎΠΌΠ°Π½Π΄ΠΎΠΉ ΠΌΡ‹ Π΄ΠΎΠ±Π°Π²ΠΈΠ»ΠΈ ΠΏΠ°ΠΏΠΊΡƒ ΠΈ Π΅Π΅ содСрТимоС Π² Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ git.

ΠžΡ‚ΠΏΡ€Π°Π²ΠΊΠ° Π΄Π°Π½Π½Ρ‹Ρ… Π½Π° GitHub

Π’Π΅ΠΏΠ΅Ρ€ΡŒ ΠΌΠΎΠΆΠ½ΠΎ ΠΎΡ‚ΠΏΡ€Π°Π²ΠΈΡ‚ΡŒ Π΄Π°Π½Π½Ρ‹Π΅ Π½Π° сСрвис. Для этого Ρƒ нас Π΄ΠΎΠ»ΠΆΠ½Π° Π±Ρ‹Ρ‚ΡŒ зарСгистрированная учСтная запись ΠΈ создан Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ Π½Π° GitHub.

Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ рСпозитория

ΠŸΠ΅Ρ€Π΅Ρ…ΠΎΠ΄ΠΈΠΌ Π½Π° ΠΏΠΎΡ€Ρ‚Π°Π» github.com ΠΈ Π²Ρ…ΠΎΠ΄ΠΈΠΌ Π² систСму ΠΈΠ»ΠΈ ΠΏΡ€ΠΎΡ…ΠΎΠ΄ΠΈΠΌ Π½Π΅ΡΠ»ΠΎΠΆΠ½ΡƒΡŽ Ρ€Π΅Π³ΠΈΡΡ‚Ρ€Π°Ρ†ΠΈΡŽ:

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

ΠŸΡ€ΠΎΡ…ΠΎΠ΄ΠΈΠΌ процСсс подтвСрТдСния, Ρ‡Ρ‚ΠΎ ΠΌΡ‹ Π½Π΅ Ρ€ΠΎΠ±ΠΎΡ‚. Π—Π°Ρ‚Π΅ΠΌ Π·Π°Π²Π΅Ρ€ΡˆΠ°Π΅ΠΌ нСсколько шагов рСгистрации, наТимая Submit. Π’ ΠΈΡ‚ΠΎΠ³Π΅ ΠΌΡ‹ ΠΏΠΎΠ»ΡƒΡ‡ΠΈΠΌ письмо Π½Π° адрСс элСктронной ΠΏΠΎΡ‡Ρ‚Ρ‹, ΠΊΠΎΡ‚ΠΎΡ€ΡƒΡŽ ΡƒΠΊΠ°Π·Π°Π»ΠΈ ΠΏΡ€ΠΈ рСгистрации. НСобходимо Π±ΡƒΠ΄Π΅ΠΌ ΠΏΠΎΠ΄Ρ‚Π²Π΅Ρ€Π΄ΠΈΡ‚ΡŒ email, пСрСйдя Π² письмС ΠΏΠΎ ΠΊΠ½ΠΎΠΏΠΊΠ΅ Verify email address.

Π‘ΠΎΠ·Π΄Π°Π΅ΠΌ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ. Для этого ΠΊΠ»ΠΈΠΊΠ°Π΅ΠΌ ΠΏΠΎ ΠΈΠΊΠΎΠ½ΠΊΠ΅ профиля ΠΈ ΠΏΠ΅Ρ€Π΅Ρ…ΠΎΠ΄ΠΈΠΌ Π² Ρ€Π°Π·Π΄Π΅Π» Your repositories:

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

И ΠΊΠ»ΠΈΠΊΠ°Π΅ΠΌ ΠΏΠΎ ΠΊΠ½ΠΎΠΏΠΊΠ΅ New. Π’ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰Π΅ΠΌ ΠΎΠΊΠ½Π΅ Π΄Π°Π΅ΠΌ Π½Π°Π·Π²Π°Π½ΠΈΠ΅ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΡŽ ΠΈ Π½Π°ΠΆΠΈΠΌΠ°Π΅ΠΌ Create repository:

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

ΠœΡ‹ ΡƒΠ²ΠΈΠ΄ΠΈΠΌ страницу с ΠΏΡƒΡ‚Π΅ΠΌ ΠΊ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΡŽ:

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

Π—Π°Π»ΠΈΠ²Π°Π΅ΠΌ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ Π² Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ Π½Π° GitHub

ДобавляСм ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ ΠΊ Π½Π°ΡˆΠ΅ΠΌΡƒ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Ρƒ:

* Π³Π΄Π΅ ΠžΡ‡Π΅Ρ€Π΅Π΄Π½ΠΎΠ΅ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠ΅ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° β€” ΠΏΡ€ΠΎΠΈΠ·Π²ΠΎΠ»ΡŒΠ½Ρ‹ΠΉ ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ; ΠΏΠ°Ρ€Π°ΠΌΠ΅Ρ‚Ρ€ -a ΡƒΠΊΠ°Π·Ρ‹Π²Π°Π΅Ρ‚, Ρ‡Ρ‚ΠΎ ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ Π½ΡƒΠΆΠ½ΠΎ ΠΏΡ€ΠΈΠΌΠ΅Π½ΠΈΡ‚ΡŒ ΠΊΠΎ всСм ΠΈΠ·ΠΌΠ΅Π½Π΅Π½Π½Ρ‹ΠΌ Ρ„Π°ΠΉΠ»Π°ΠΌ.

Π’Π΅ΠΏΠ΅Ρ€ΡŒ ΠΏΠΎΠ΄ΠΊΠ»ΡŽΡ‡Π°Π΅ΠΌΡΡ ΠΊ созданному Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΡŽ:

git remote add origin https://github.com/dmosktest/project1.git

* Π³Π΄Π΅ dmosktest β€” Π»ΠΎΠ³ΠΈΠ½, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ Π±Ρ‹Π» ΡƒΠΊΠ°Π·Π°Π½ ΠΏΡ€ΠΈ рСгистрации Π½Π° github, Π° project1 β€” Π½Π°Π·Π²Π°Π½ΠΈΠ΅, ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠ΅ ΠΌΡ‹ Π·Π°Π΄Π°Π»ΠΈ, ΠΊΠΎΠ³Π΄Π° создавали Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ.
* ΡƒΠ΄Π°Π»ΠΈΡ‚ΡŒ ΡƒΠ΄Π°Π»Π΅Π½Π½Ρ‹ΠΉ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ ΠΌΠΎΠΆΠ½ΠΎ ΠΊΠΎΠΌΠ°Π½Π΄ΠΎΠΉ git remote rm origin.

Π—Π°ΠΊΠΈΠ΄Ρ‹Π²Π°Π΅ΠΌ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ Π½Π° GitHub:

git push origin master

* Π³Π΄Π΅ master β€” Π²Π΅Ρ‚ΠΊΠ° ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° (Π²Π΅Ρ‚ΠΎΠΊ ΠΌΠΎΠΆΠ΅Ρ‚ Π±Ρ‹Ρ‚ΡŒ нСсколько).

Π’ нашСм ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π΅ Π½Π° GitHub Π΄ΠΎΠ»ΠΆΠ½Ρ‹ ΠΏΠΎΡΠ²ΠΈΡ‚ΡŒΡΡ Ρ„Π°ΠΉΠ»Ρ‹ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°:

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

ΠŸΠΎΠ»ΡƒΡ‡Π΅Π½ΠΈΠ΅ Ρ„Π°ΠΉΠ»ΠΎΠ² с GitHub

Для Π·Π°Π³Ρ€ΡƒΠ·ΠΊΠΈ Π½Π° ΠΊΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€ Ρ„Π°ΠΉΠ»ΠΎΠ², создаСм ΠΊΠ°Ρ‚Π°Π»ΠΎΠ³ с ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ΠΎΠΌ ΠΈ ΠΏΠ΅Ρ€Π΅Ρ…ΠΎΠ΄ΠΈΠΌ Π² Π½Π΅Π³ΠΎ:

ΠŸΡ€ΠΎΠ²ΠΎΠ΄ΠΈΠΌ Π½Π°Ρ‡Π°Π»ΡŒΠ½ΡƒΡŽ настройку локального рСпозитория:

ΠŸΠΎΠ΄ΠΊΠ»ΡŽΡ‡Π°Π΅ΠΌΡΡ ΠΊ ΡƒΠ΄Π°Π»Π΅Π½Π½ΠΎΠΌΡƒ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΡŽ:

git remote add origin https://github.com/dmosktest/project1.git

Π‘ΠΊΠ°Ρ‡ΠΈΠ²Π°Π΅ΠΌ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ ΠΊΠΎΠΌΠ°Π½Π΄ΠΎΠΉ:

git pull https://github.com/dmosktest/project1.git master

ΠšΠ»ΠΎΠ½ΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°

НапримСр, ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΡŽ наш Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ:

git clone https://github.com/dmosktest/project1.git

* данная ΠΊΠΎΠΌΠ°Π½Π΄Π° создаст Π² Ρ‚Π΅ΠΊΡƒΡ‰Π΅ΠΉ ΠΏΠ°ΠΏΠΊΠ΅ ΠΊΠ°Ρ‚Π°Π»ΠΎΠ³ project1 ΠΈ ΠΈΠ½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·ΠΈΡ€ΡƒΠ΅Ρ‚ Π΅Π³ΠΎ ΠΊΠ°ΠΊ Π»ΠΎΠΊΠ°Π»ΡŒΠ½Ρ‹ΠΉ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΠΉ git. Π’Π°ΠΊΠΆΠ΅ Π·Π°Π³Ρ€ΡƒΠ·ΠΈΡ‚ Ρ„Π°ΠΉΠ»Ρ‹ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°.

Π’ΠΎΠ·ΠΌΠΎΠΆΠ½Ρ‹Π΅ ошибки

1. ΠŸΡ€ΠΈ ΠΏΠΎΠΏΡ‹Ρ‚ΠΊΠ΅ ΠΎΡ‚ΠΏΡ€Π°Π²ΠΈΡ‚ΡŒ Π΄Π°Π½Π½Ρ‹Π΅ Π½Π° GitHub, ΠΏΠΎΠ»ΡƒΡ‡Π°Π΅ΠΌ ΠΎΡˆΠΈΠ±ΠΊΡƒ:

error: src refspec master does not match any.
error: failed to push some refs to ‘https://github.com/dmosktest/project1.git’

* Π³Π΄Π΅ dmosktest/project1.git β€” ΠΏΡƒΡ‚ΡŒ ΠΊ Π½Π°ΡˆΠ΅ΠΌΡƒ Ρ€Π΅ΠΏΠΎΠ·ΠΈΡ‚ΠΎΡ€ΠΈΡŽ.

ΠŸΡ€ΠΈΡ‡ΠΈΠ½Π°: ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ Π½ΠΈ Ρ€Π°Π·Ρƒ Π½Π΅ Π±Ρ‹Π» зафиксирован (Π·Π°ΠΊΠΎΠΌΠΌΠΈΡ‡Π΅Π½).

РСшСниС: добавляСм ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ ΠΊ Π½Π°ΡˆΠ΅ΠΌΡƒ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Ρƒ:

How to Create and Clone a Repo in GitHub on Ubuntu 18.04

GitHub is a free repository hosting service, used as version control for web developers to download and push their code from their servers to other users.Π’ In our previous article on Installing Git on Ubunto 18.04, we’ve instructed on how to add Git to your Ubuntu VPS server. We’ll continue on and show you how to add and clone a repo from GitHub to your server.

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

Preflight

Step 1: Set up a GitHub Account

If you havenΠ²Π‚™t done so already, make a Github.com account, itΠ²Π‚™s free! This is where youΠ²Π‚™ll be creating a repo and putting in files. Π’ Once youΠ²Π‚™re in your GitHub account, click Create a repository (or New Repository), which will take you to a page where you can add details for your repo.

Step 2: Create a Repo

Fill out the details for your repo and be sure to take note your repo name, youΠ²Π‚™ll need it later in this tutorial. Π’ If you are curious about the options on this screen, the README file is common for writing instructions to your users. Π’ The licensing option can seem confusing but if you are questioning which one to choose you can check out this site to guide you. Once all details are in, click Create repository.

Once created, youΠ²Π‚™ll see two files in your repository if you chose the licensing and README file.

Step 3: Configuring Git per User

Step 4: Create A Directory

When you create a directory, you can use this space to sync newly written/edited code to your GitHub account. IΠ²Π‚™m going to call this environment git_environment and move into the directory using the cd command.

Step 5: Copy your GitHub URL

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

First, its necessary to clone or download our already pre-existing README and licensing file from our GitHub account. Π’ Jump back to your GitHub account, click Clone or download and copy your GitHub link.

Step 6: Clone your Repo

In your terminal, you should find yourself in the GitHub directory. Π’ We will first clone our repo with our copied GitHub URL and then change directories to our project name.

git clone https://github.com/username/want-some-java.git

By listing the want-some-java directory, youΠ²Π‚™ll see the two files in your repo, verifying that the cloning has worked.

Example Output: LICENSE Π’ README.md

In our next tutorial, where will teach you how to edit/create a file on your server and push the script to your GitHub account.

Our talented Support Teams are full of experienced Linux technicians and System administrators who have an intimate knowledge of multiple web hosting technologies, especially those discussed in this article. We are always available to assist with any issues related to this article, 24 hours a day, 7 days a week 365 days a year.

If you are a Fully Managed VPS server, Cloud Dedicated, VMWare Private Cloud, Private Parent server or a Dedicated server owner and you are uncomfortable with performing any of the steps outlined, we can be reached via phone @800.580.4985, a chat or support ticket to assisting you with this process.

Related Articles:

About the Author: Alex Gorzen

Alex Gorzen has been helping others with technology his whole life. He played with computers even before he could read and wants to make sure his children share that same love as they grow up. In his free time, he enjoys gardening, building things, and learning new skills.

How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ How to clone github repository ubuntu. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ How to clone github repository ubuntu. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ How to clone github repository ubuntu. Π€ΠΎΡ‚ΠΎ How to clone github repository ubuntu

Join our mailing list to receive news, tips, strategies, and inspiration you need to grow your business

How to clone a private repository in Github

Git is an open-source, version control tool created in 2005 by developers working on the Linux operating system.

Cloning public repositories from Github or Gitlab using git is pretty straightforward, but when it comes to handle a private one, sometimes the situation is a bit tricky. You can either clone a private Github repository with a password like you normally would with any other online service, or do it with a token if you enabled 2-factor-authentication on your account or your organization uses SAML SSO. Alternatively, you can also clone private Github repo with SSH credentials.

In this article, we will show you how to clone a private repo using git with both a password and a Github token. We will also cover possible solutions to the common β€œRepository not found” error message when you try to clone a private repo from Github.

Prerequisites

In order to clone a git repository, you obviously need to have Git installed on your computer.

To check if Git is correctly installed on Windows or Linux, execute the following command :

Now that you know that Git is correctly installed, you’re ready to start cloning private Github repositories.

Clone private Github repo with username/password

In a few moment, you will be prompted for a password. Once you input the correct one, the output should look something like this :

Alternatively, if you don’t really care about exposing your password in plain text, you can put it directly in the repository URL :

Important: Private repositories cannot be cloned using git protocol.

You can configure git to specifically use HTTPS over other protocols by setting hub.protocol global flag to https. This will affect all git operations, including clone, fork, remote add and other operations that expand references to GitHub repositories as full URLs.

Clone private Github repo without typing password

Using an username/password pair, you have to input the password every time you want to push, pull or do operations to the repo. This behaviour can be annoying at times. Luckily, you can permanently store your password in git configuration file so you won’t be prompted ever again.

First, you have to enable the credentials helper by setting the credential.helper flag to store.

Clone private Github repo with SSH keys

To be able to clone from Github using SSH, you must generate an SSH keypair on your computer and add the public key to your GitHub account. Github documentation has extensively covered the process at Connecting to GitHub with SSH.

Next, you have to find the repository SSH URL from Github repo page.

Click Use SSH and the SSH URL should be displayed in a second.

This SSH URL works exactly the same way username/password pair does, except you don’t have to enter a password because it is already stored on your system in the form of a private key.

Clone private Github repo with token

In order to clone a Github repo with a 2FA-enabled Github account, you need to use a personal access token instead of entering the password. This Github token also allows you to login to organizations that uses SAML single sign-on – a technology used to control who can access which part of the repository.

Head over to Github dashboard. In the upper-right corner of any page, click your profile photo, then click Settings.

In the left sidebar, click Developer settings.

You will be redirected to Github Apps page. In the left sidebar, click Personal access tokens and then Generate new token.

You have to give your token a descriptive name and grant it the permission to access your repositories. To use your token to access repositories from the command line, select repo. Finally, click Generate Token button at the end of the webpage.

At this stage, you have to copy the token and securely save it elsewhere. For security reasons, after you navigate off the page, you will not be able to see the token again.

Treat your tokens like passwords and keep them secret because they are actually your password to some extent.

Once you have the token, you can use it just like a password. Whenever you are prompted for password, input that token. The token is pretty long and hard to remember, so I recommend you saving it to avoid type it again and again.

β€œRepository not found” error when clone a private repo

If you see this error message when cloning a private Github repo, it basically means that the repository does not exists (of course) and you don’t have the permission to access it.

On Linux, try clearing saved credentials from your system with the following command.

On a MacOS device, you can go to Keychain Access, find the credentials related to Git and Github, then change the username and password to the correct value.

If you still get the error, despite following all above solutions, you can try reinstalling git’s credential-manager using these commands.

Π˜ΡΡ‚ΠΎΡ‡Π½ΠΈΠΊΠΈ ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΠΈ:

Π”ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ

Π’Π°Ρˆ адрСс email Π½Π΅ Π±ΡƒΠ΄Π΅Ρ‚ ΠΎΠΏΡƒΠ±Π»ΠΈΠΊΠΎΠ²Π°Π½. ΠžΠ±ΡΠ·Π°Ρ‚Π΅Π»ΡŒΠ½Ρ‹Π΅ поля ΠΏΠΎΠΌΠ΅Ρ‡Π΅Π½Ρ‹ *