Giter Site home page Giter Site logo

git-dot-aspx's Introduction

This is a simple implementation of git-http-backend written in ASP.NET that can be used to read/write git repositories on Windows with IIS.

** This was an experimental project that is no longer maintained, developed or supported. Please feel free to use the code but no further changes will be made and pull requests will not be merged in **

Inspired by Grack (http://github.com/schacon/grack)

This is largely untested, but has been developed with IIS7.5 under Windows 7 x64. 

The version of GitSharp included is a custom build with some minor changes. Details to follow.

Requirements:
- VS2010 with .NET 4
- ASP.NET MVC2
- IIS7+

Edit the web.config and change the "RepositoriesDirectory" app-setting to point to a directory containing git repositories.

Assuming that your repositories directory looks like this:

C:\Repositories\Repo1.git

...and the RepositoriesDirectory app-setting is configured to be C:\Repositories:

<appSettings>
		<add key="RepositoriesDirectory" value="C:\Repositories"/>
</appSettings>
	
...and the application is configured under IIS7 on port 8000, then issuing the following command will cone the Repo1.git repository:

git clone http://localhost:8000/Repo1.git

Once cloned, push/pull work as expected.

There are currently no tests (something I hope to rectify soon). If you run into a problem, the best way to troubleshoot is by using Fiddler to see the raw request/response data.

git-dot-aspx's People

Contributors

gramgibson avatar jeremyskinner avatar linquize avatar tolism7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-dot-aspx's Issues

500 HTTP Error

I'm using this program on Windows Server 2012 R2(Japanese Edition).
Sometimes I got 'HTTP Error 500' when I pushing to Server.
This problem is not everytime. I can push the data to Server but sometimes I got 'HTTP Error 500'.
However, I don't know other error-trigger.
When I got a 'HTTP Error 500', I did 'application pool recycling' on IIS.
After then It is work.

Do you have any ideas for solve a problem?
**I'm sorry, but I'm not good at English.

This is a '500 Error page'-------->
Line 15: < ul id = "repositories" >
Line 16: <% foreach (var repository in Model.Repositories) { %>
Line 17: < li>5
Line 18: < a class="repository" href="javascript:void(0)" title="<%"Url.ProjectUrl(repository.Name)"%>">

ソース ファイル: d:\git_aspx\Views\DirectoryList\Index.aspx 行: 16

ソース ファイル: d:\git_aspx\Views\DirectoryList\Index.aspx 行: 16

スタック トレース:

[NullReferenceException: オブジェクト参照がオブジェクト インスタンスに設定されていません。]
GitSharp.Core.OffsetCache2.Gc() in C:\Projects\GitSharp\GitSharp.Core\OffsetCache.cs:489 GitSharp.Core.OffsetCache2.removeAll(PackFile pack) in C:\Projects\GitSharp\GitSharp.Core\OffsetCache.cs:393
GitSharp.Core.WindowCache.Purge(PackFile pack) in C:\Projects\GitSharp\GitSharp.Core\WindowCache.cs:167
GitSharp.Core.PackFile.Close() in C:\Projects\GitSharp\GitSharp.Core\PackFile.cs:195
GitSharp.Core.PackFile.Dispose() in C:\Projects\GitSharp\GitSharp.Core\PackFile.cs:628
GitSharp.Core.ObjectDirectory.closeSelf() in C:\Projects\GitSharp\GitSharp.Core\ObjectDirectory.cs:111
GitSharp.Core.ObjectDatabase.close() in C:\Projects\GitSharp\GitSharp.Core\ObjectDatabase.cs:107
GitSharp.Core.ObjectDatabase.Dispose() in C:\Projects\GitSharp\GitSharp.Core\ObjectDatabase.cs:99
GitSharp.Core.Repository.Close() in C:\Projects\GitSharp\GitSharp.Core\Repository.cs:943
GitSharp.Core.Repository.Dispose() in C:\Projects\GitSharp\GitSharp.Core\Repository.cs:1394
GitAspx.Lib.Repository.GetLatestCommit() in c:\Projects\git-dot-aspx\GitAspx\Lib\Repository.cs:64
GitAspx.Controllers.DirectoryListController.b__1(Repository x) in c:\Projects\git-dot-aspx\GitAspx\Controllers\DirectoryListController.cs:37
System.Linq.WhereSelectListIterator`2.MoveNext() +243
ASP.views_directorylist_index_aspx.__RenderMain(HtmlTextWriter __w, Control parameterContainer) in d:\git_aspx\Views\DirectoryList\Index.aspx:16
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +149
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +149
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +84
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +149
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5362

<----------------------------------------

Thank you for your reading.

[Feature] Improved clone URL to support basic authentication

Hi Jeremy,

First, thanks for the great program. I have managed to setup a git and hg repository in parallel on my machine (Windows 7 x64, IIS7) following your tutorials. Regarding the URL you display when clicking on a git repository one currently gets something like

git clone: [http://localhost/git/sandbox]

Assuming the website has enabled basic authentication and disabled anonymous authentication it would be great if you could change the URL to

git clone: [http://foo@localhost/git/sandbox]

Regards,
Hauke

p.s. I am a total IIS noob an just started to play around with it yesterday.

.net Issue

I deploy solution on windows 2008 R2, but when a try to call the application, i've got an issue :
Parser Error Message: Could not load type 'GitAspx.MvcApplication'.

Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="GitAspx.MvcApplication" Language="C#" %>

Can you help me ?

Regards

[Feature] https support

Hi again,

Https support would be great since basic authentication does not make much sense when everything is sent as plain text over the web. Well, I am not telling you anything new, right? :)

Since I have already everything setup (following your IIS-hg turotial for the https configuration) and did some test, I thought it might be helpful to give you some feedback on the error messages I got. So here is my output, when everything was configure to use SSL:

--- snip ---
C:\tmp\git>git clone https://[email protected]/git/sandbox
Initialized empty Git repository in C:/tmp/git/sandbox/.git/
Password:
error: error setting certificate verify locations:
CAfile: /bin/curl-ca-bundle.crt
CApath: none
while accessing https://[email protected]/git/sandbox/info/refs

fatal: HTTP request failed
--- snap ---

HTH,
Hauke

Server-Side hooks not triggering

Git hooks don't appear to be firing when using git-dot-aspx path.

My test hook is named "post-receive" containing this:

  #!/bin/sh
    echo "post-receive hook" >> A:\Test.txt
    echo "Hooked"

I haven't found any way to debug or figure out what's going on, so I'm not sure what additional information I can provide.

403

I can view the repositories from the Application page.
However, when I try to clone the repo I get that error

$ git clone http://localhost/GitAspx/registry.git
Cloning into 'registry'...
fatal: unable to access 'http://localhost/GitAspx/registry.git/': The requested URL returned error: 403

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.