Skip to content

adanselm/exgitd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exgitd

Simple Elixir/Phoenix app acting as a Git Smart HTTP server.

Config

In your application's config.exs :

config :exgitd, [repositories_root: "/tmp/"]

repositories_root is the directory where Exgitd will look for your repositories.

Installation

$ mix do: deps.get, compile
$ mix phoenix.start

Usage

Say I have a bare git repository in /tmp/myuser/myrepo.git

$ # This will create a `myrepo` directory with a clone of the repo:

$ git clone https://localhost:4000/git/myuser/myrepo.git

$ # This pulls the changes from the master branch:

$ git pull https://localhost:4000/git/myuser/myrepo.git master

$ # I made local changes that I commited, push them:

$ git push https://localhost:4000/git/myuser/myrepo.git master

You can also list the available repositories of a given user with a GET request:

$ curl -X GET https://localhost:4000/git/myuser/
myrepo.git
myotherrepo.git

And upload a file through the /file/ route:

$ curl -F "file=@MyFile" https://localhost:4000/file/myuser

Which will put it by default in :repositories_root/../files/

** If you're using it anywhere else than localhost, you should consider using https...**

##TODO

  • No AUTH!
  • No Error handling
  • No tests

Resources

Articles used to base this code on.

Licensing

Copyright © 2014 Adrien Anselme and contributors MIT license. See COPYING for details.

About

Elixir/Phoenix HTTP Server for Git smart protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published