Home > Enterprise >  Git - Cloning only creates folder and ends up hanging
Git - Cloning only creates folder and ends up hanging

Time:12-22

I have a github account and marked one of the repository as private. Files were pushed to this repo from MachineA (running Win10) using account UAccount1.

Now, i'm trying to access the private repository from MachineB (running Win11 Home) using account UAccount2. I found the folder is created in MachineB after issuing the clone command. But none of the files were synched to MachineB.

What is the procedure to get all the files of the given repository? Is making the visibility to public is the only option ?

Thanks in Advance.

CodePudding user response:

Is making the visibility to public is the only option ?

No, but you need to confirm GitHub account 'UAccount2' is declared as a collaborator of the private repository.

Then a git clone would clone and checkout the files from the default branch of that repository.
Make sure which account is actually used:

  • an SSH URL might use an SSH key associated to another account, for instance
  • an HTTPS URL might use cached credentials associated to another account.

The OP luckyluke adds in the comments:

the warning: could not find UI helper 'GitHub.UI' is the issue.

I tried pushing from PowerShell, but instead of locking up (like it did in bash), I got a text menu of ways to authenticate with credentials manager.
Using the default, "Web browser", with a browser already authenticated to my Github account did the tric


This should be fixed in Git For Windows v2.39.0.windows.2

The Git Credential Manager version shipped with Git for Windows v2.39.0 could not always find its UI helper which was fixed by upgrading to a fixed version.

CodePudding user response:

If you are using different devices and different GitHub accounts, you will need to request access to the repository for each account that you want to grant access to.

To do this, you will need to follow these steps:

  1. On the first device, log in to the GitHub account that has access to the repository and navigate to the repository.
  2. Click on the "Settings" tab for the repository and then click on the "Collaborators" subtab.
  3. In the "Collaborators" section, enter the username of the GitHub account that you want to grant access to.
  4. Click the "Add collaborator" button to invite the user to the repository.
  5. On the second device, log in to the GitHub account that you just invited to the repository and navigate to the repository.
  6. You should now have access to the repository on the second device.

Note that the repository owner will need to approve any access requests before the user is granted access to the repository.

  • Related