2

I have few computers in local netowrk and like to make one of them like git server where other can clone git and push to that computer.

I read this topic but cant make it work

on computer 1 (ip: 88.220.100.20) i create a repo in d:/gitServer/project1 and when i try to clone repo from another computer with Git Dekstop i use url : 88.220.100.20/d:/gitServer/project1 im getting errors like this

Thq question is what im doing wrong and how to make one of the local computers like git server

Authentication failed. Some common reasons include:

- You are not logged in to your account: see File > Options.
- You may need to log out and log back in to refresh your token.
- You do not have permission to access this repository.
- The repository is archived on GitHub. Check the repository settings to confirm you are still permitted to push commits.
- If you use SSH authentication, check that your key is added to the ssh-agent and associated with your account.
- If you use SSH authentication, ensure the host key verification passes for your repository hosting service.
- If you used username / password authentication, you might need to use a Personal Access Token instead of your account password. Check the documentation of your repository hosting service.
torek
  • 448,244
  • 59
  • 642
  • 775
bobi
  • 169
  • 2
  • 16
  • If you have a spare PC, or even can run a VM, just setup a GitLab server, this way you get all the features of GitLab as well as a shared server for your colleagues. – Geoffrey Jul 08 '22 at 08:30
  • If your spare PC cannot handle gitlab (e.g.: doesn't have enough RAM), you can also try gitea (can run with only 1/2GB RAM) – Kristian Jul 08 '22 at 08:31
  • guessing from your url `88.220.100.20/d:/gitServer/project1`, I'm assuming the git server PC runs windows. Have you configured the ssh server? can you log in to the git server PC via ssh? (you can use git bash and run `ssh -vv 88.220.100.20` and see where it fails) – Kristian Jul 08 '22 at 08:33
  • Since the server looks like a Windows box, just allow the directory to be shared, and mount the share on the other boxes. Then `git clone //88.220.100.20/gitServer/project1` on the boxes. – j6t Jul 08 '22 at 08:35
  • @Kristian it says connection time out , let me try to config ssh server on that computer – bobi Jul 08 '22 at 08:53
  • Note that GitHub-Desktop is designed specifically to be used with GitHub, not with any generic Git server. I haven't actually used GitHub-Desktop and it's possible that its design is sufficiently flexible to work with other servers, but I would not advise counting on that. It's generally *much easier* to share direct Git access via ssh than any other way, so if that's an option, consider doing that. – torek Jul 08 '22 at 20:07

1 Answers1

0

let me try to config ssh server on that computer

The other option would be simply to have a shared folder that you can then access through shell from your first computer:

dir \\88.220.100.20\project1

That means GitHub Desktop (or git in command-line) would use the local protocol with an UNC path

file:////88.220.100.20/project1
# or
//88.220.100.20/project1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250