简体   繁体   中英

First push to git repository on LAN gives error

I'm new to Git, and setting up a new repository on one of my own windows servers on my local network, with a view to being able to share source code with another developer on my network.

I have installed Git on my local windows PC, and have created a local repository for one of my existing projects.

I have also set up a shared folder on \\myserver\\Git Repository\\

I have done a commit to the local repository, and am now trying to push that to the shared repository on the server.

I am not 100% sure what format I should be using for my URL, but the most promising error I can get is:

Pushing to file://myserver/Git%20Repository/Inhouse/File%20Comparer/.git fatal: 'C:/Program Files (x86)/Git/Git Repository/Inhouse/File Comparer/.git' does not appear to be a git repository fatal: Could not read from remote repository.

Why it is looking in program files folder, I have no idea.

I'm trying to keep things simple (to start of at least), and so have been avoiding using any other protocols.

I've tried googling, to find URL examples, but I just can't seem to get past this error about Got looking for the repository in the program files folder.

Any ideas?

Thanks In advance.

Maya

Got it working!

Instead of googling Git+local network share, I specifically added "windows" to my search too, as all the other information I was finding applied mostly to Linux servers.

This link helped the most:

http://elegantcode.com/2011/06/18/git-on-windows-creating-a-network-shared-central-repository/

I still didn't manage to get the //myserver/myshare/myprjectrepo working, so I mapped the share to a drive letter, and used R:/myprojectrepo instead. All working now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM