A similar issue is described here however, my symptoms are a little different and none of the steps there seemed to work. Nor does the suggestion here work.
I'm attempting to use SourceTree to clone a private repo belonging to github organization of which I am a part. I have full permissions to view and commit to the repo, I can see it online when I log in, AND I can clone just fine with the command line and also via the github desktop application. It only fails in SourceTree.
Further, it is not bad credentials or anything like that, because I can clone, commit and push to my other non-private repos on github using SourceTree with my github credentials.
From the "Clone a Repository" dialog I enter the source URL, which looks something like this:
https://github.com/MyOrgName/reponame.git
I tab off of that field and it populates the destination path and name fields, but at the bottom of the dialog is a yellow exclamation point with this error:
This is not a valid source path / URL
If I click the error message, it brings up the "Details" dialog, which states the following (twice for some reason):
remote: Repository not found. fatal: repository 'https://github.com/MyOrgName/reponame.git/' not found remote: Repository not found. fatal: repository 'https://github.com/MyOrgName/reponame.git/' not found
I have also tried this by adding my username to the url like so:
https://[email protected]/MyOrgName/reponame.git
but no luck there either.
You also have the option to clone a private GitHub repository using SSH. To do this, you need to start by generating an SSH keypair on your local device. Then add a public key to your GitHub account.
On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings. Under "Danger Zone", click Transfer. Read the information about transferring a repository, then type the name of the user or organization you'd like to transfer ownership of the repository to.
This article will show how to clone a Git repo (repository) using Sourcetree, which can be an instrumental skill if you are part of a development team. It is also helpful if all you want to do is contribute to an open source project. What is a Git repository & what is GitHub?
To clone a private repository from your account or organization, you need to generate a PAT (Personal Access Token) on your Github account, and add it to the command above. *Organization doesn't have PAT generator. 3, Press "Personal access tokens" then press "Generate new token": * If "repo" is not checked, you cannot clone a private repository.
Before cloning a Git repo, you must download and install Sourcetree. Once Sourcetree is installed, you are all set to begin cloning your first Git repo. The following video will show you how to clone a repo from automateNow’s GitHub page so that you can start working on it on your machine.
Now back to SourceTree, go to Tools and click on Launch SSH Agent. Later, click on a small monitor icon in your taskbar. As a result, the Pageant Key List will popup. Then, click on Add Key to add the private key you saved previously. Now go back to your GitHub repository page and try to clone your repository with SSH way.
It happens because SourceTree didn't get some private access from Github while authenticating. So the solution is very simple
Fill Note as sourcetree
and Check All Scopes from checkbox as show in below screenshots
After Click on Generate Token
Now Open sourceTree
Click on sourceTree preference & Click add Account
Hope it helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With