0

I have installed Git on my computer. But I still can't find a way to clone Git repository from another machine on the same Lan network. GIT GUI doesn't provide away to fill in the credentials. (Git for Windows)

How can I achieve this?

Example :

git url : \\LAPT0\master-git
username : gUser
password : gPass
EagerToLearn
  • 675
  • 7
  • 24
  • Will this help? Use `ssh` and it should ask for the password automatically. https://stackoverflow.com/questions/28827831/how-to-setup-git-on-local-network – clamentjohn Aug 01 '18 at 07:23

2 Answers2

1

You will have to use a local file URL for that path:

git clone file:////LAPT0/master-git

This assumes that master-git is the share name. I would personally recommend though putting the Git repository into another folder inside of the share.

As for the credentials, it’s best if you open the share first in Windows Explorer so that Windows will ask you for the credentials at that point. And then all connections to the share should work without you having to provide those again, until you restart your machine.

poke
  • 369,085
  • 72
  • 557
  • 602
0

Basically to clone repo with credentials is:

git clone https://username:password@github.com/username/repository.git

In your case that the repo in other machine in the LAN, the Git repo in the other machine need to execute this command:

git init --bare

Then you have to clone the repository on your machine with:

git clone user@gitserver:/path/to/your/folder
Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114