I need to setup a Git server on windows 7 with IIS to test my EGit with eclipse. Eventually it would be use to checkout and checkin from a remote server. But I would like to test the remote checkout and checkin for EGit using a local server as of now. I have tested it to work with Github (only https not SSH, SSH seemed to have a problem). But I would like to host my own git remote server for EGit. Please let me know as to how to go about it. Thanks in advance.
You can use the "Git Web Access" project:
For those who have interests in a Smart-HTTP Git server on IIS, the project provides an ASP.NET HttpHandler that let you run Smart HTTP Git on IIS.
It is inspired by Grack, a Ruby Rack based application for Smart HTTP Git and git_http_backend.py, a python implementation of Smart HTTP Git.
You also can try out the "Bonobo-Git-Server" project, through its main project page.
Bonobo Git Server for Windows is a web application you can install on your IIS and easily manage and connect to your git repositories.
You will find other alternatives (sometime older) in "How to setup GIT bare HTTP-available repository on IIS-machine".
Related
I have laravel-vue.js framework web site project that another developer coded on digitalocean.
Also there is a git file in the framework.
I want to use git, too. However, there is another git ssh link in project.
git#gitlab.com:user/projectname.git
I created a gitlab repo but i couldn't decide what to do next.
git#gitlab.com:myuser/projectname2.git
How can i get this project to my local and do changes on git.
Generally i use phpstorm for coding.
Thanks.
You need to change your git origin url in your repository.
Use git remote set-url origin new.git.url/here to replace old git URL with the new one.
I have a VPS - Windows Server 2012 R2 and I already install GIT on the server.
Now I want to set up a repository on it and our team can clone that repository to local computer and work on it.
I try to find the way to set up but I have not found any posts.
How can I set up it? Can I use any tool to set up on vps and commit from local machine?
You need a listener (Apache or ssh) in order for Git on your VPS to listen to Git queries (clone/pull/push)
You can use:
ssh (with an ssh server)
IIS (with Bonobo Git server)
https with a Go server (multiplatform) like Gogs
I installed Git for Windows in order to clone and pull a project hosted on a remote Linux server.
In my repository (D:/repositories/my-project) I launch the following commands
git clone server#192.168.56.101:/var/www/web/my-project/.git
git pull origin master
So far so good. I pull the project files whenever modifications are applied on the server.
But now I'd like to pull or push from the remote server to my local repository.
I tried many things but I can't figure out how to access the repository located on my local machine.
Things like:
git pull duddy#my-pc:/d/repositories/my-project/.git master
just doesn't work, Git says:
ssh: Could not resolve hostname my-pc: Name or service not known
fatal: Could not read from remote repository.
Can someone helps me ?
First things first, I would recommend you try simply running git pull.
If this doesn't work, try running git remote -v and check to make sure that the URL for your server is listed as an origin (server#192.168.56.101:/var/www/web/my-project/.git).
Your issue is that you are inputting the URL for your local repository in your attempt to git pull.
I suggest reading the git-pull documentation to learn more about how pull works.
Basically, you need to have some service at your workstation which serves the requests. There are following options (I did not try most of them myself, just making it up from what I know):
use the windows file access. This is the easiest to setup at the windows workstation - just share the repository folder. The Linux side should somehow be able to mount windows shares (like described, for example, here: https://wiki.ubuntu.com/MountWindowsSharesPermanently). If you manage to mount your \\my-pc\repo to some /mount/my-pc-repo, then you can access it as file:///mount/my-pc-repo.
run git daemon at windows. Set up instructions are available at SO (for example, https://stackoverflow.com/a/2275844/2303202) and it pretty straightforward, but it does not have any authentication and in most cases it is reasonable to use it only for reading, so you will not be able to push to the workstation, only fetch.
set up ssh daemon and access through ssh authentication with read-write access. Git for windows installation contains the needed software (the sshd.exe binary, it is there at least for Git for Windows 2.6.0), probably there is a way to utilize it but I could not find it quickly.
set up HTTP(S) service at your workstation. I don't know if it is possible to do only with Git for Windows (it might be, with some perl module which happen to be included with it), or you should use some other software.
My web application are built on latest laravel framework with it's front end task and dependencies are managed through gulp, node, npm and bower.
My remote hosting server basically supports git only and does not support nodejs and npm. So currently I am building it locally and deploying it manually via ftp.
So, is their any tools that simply track the changes on locally build file and uploads the changes on the remote? Or may be there are better ways to do it?
What you are describing could be fixed by committing your locally built files.
If it supports git and you have ssh access - set your remote repository local machine. Commit your local build files and push to a remote repository. Pull changes from remote repository on remote server.
I had a similar situation where I was stuck with ftp and using Laravel.
To aliviate the agony of using ftp, I found this tool called dploy.
It simulates git in ftp, so you commit locally or to your remote repository, and dploy will take care of synchronizing your local build with your live server.
https://github.com/LeanMeanFightingMachine/dploy
I hope it helps.
I have git installed on my local windows 7 PC. I can commit there.
I have git installed on my linux dev server. I can commit there.
I have successfully cloned to each machine a github repository. So they seem to be working in that sense. But I'd like to be able to push from my PC to the dev server.
I believe that I am missing a crucial piece of info here and can't find any tutorials, questions answered on how to set this up.
I have a few questions:
I was led to believe that I don't NEED to set up ssh keys to do this, I will just be prompted for a password.
My site was developed in php, is it possible to push to the linux server and have the live dev site continue running, with the new changes?
Here is how I'm currently trying to clone from my linux server and the response... (i changed the IP address)
C:\DevEnv>git clone 0.0.0.0:gitrepo.git
Cloning into 'gitrepo'...
fatal: The remote end hung up unexpectedly
I have a directory called gitrepo.git that has a repository.
I also tried creating a repository in the home dir of mysite.com. When I try cloning that from my PC this is what happens:
C:\DevEnv>git clone http://mysite.com
Cloning into 'mysite.com'...
fatal: http://mysite.com/info/refs not valid: is this a git repository?
I've read through many tutorials and they mostly talk about either really really basic concepts, or how to push/pull to github, or just skip over certain settings so when I follow them I get fatal: The remote end hung up unexpectedly...
Any help, point in the right direction would be most appreciated!
You may need to provide your username. For example:
$ git clone myusername#myhost.com:/opt/git/project.git
Or you could setup a samba-share on the Linux box and share your git-repo, mount the share in windows and clone it from the filesystem.
More info about setting up git on a server:
http://progit.org/book/ch4-0.html
Check path to your project.
Try to clon via git protocol:
C:\DevEnv>git clone git://0.0.0.0/gitrepo.git