Giter VIP home page Giter VIP logo

mango's Introduction

Mango

Git, completely decentralised.

Using Ethereum and P2P content addressable networks (Swarm, IPFS, SSB) as a backend to Git.

This repository is also available on Mango at mango://{...}

NOTE: the protocol is subject to change. With subsequent changes your past repositories can became unaccessible.

Get started

Prerequisites:

  • an Ethereum node
  • an IPFS node
  • git and node.js environment

Install the helpers with: $ npm install -g mango-admin git-remote-mango

First you will need to create a repository on Ethereum. You can do this with: $ mango-admin create. This will use a simple contract with access control.

If you have a repository you want to upload:

  1. Add the new remote: $ git remote add mango mango://{repo address}

  2. Push to the new remote: $ git push mango master

If you know a repository you want to download: $ git clone mango://{repo address}

The repo address is the address of the repo contract - basically it is an Ethereum address. In the future, it could be a symbolic name retrieved via name systems, such as ENS.

You can use MangoRepo.sol as a repository contract. It is very basic and allows only the owner to publish Git updates.

If you have more than one Ethereum account in your local node, the desired address can be specified in the URL: mango://{ethereum account}@{repo address}

Use in test mode

The easiest way to try out Mango is using on a test network.

I suggest to try out testrpc, which is an Ethereum node simulator.

Additionally the data to IPFS will not be uploaded if an IPFS daemon is not installed and/or is not in synchronisation mode. Data will be stored and accessible locally only.

Example

Adding an existing repository:

$ git remote add mango mango://0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59
$ git push mango master
Counting objects: 17, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (17/17), done.
Writing objects: 100% (17/17), 5.21 KiB | 0 bytes/s, done.
Total 17 (delta 7), reused 0 (delta 0)
To mango://0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59
 * [new branch]      master -> master
$

Cloning:

$ git clone mango://0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59
Cloning into '0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59'...
12% =====================------------------------------------------------------------------------------------------------------------------------------------------------------------
18% ===============================--------------------------------------------------------------------------------------------------------------------------------------------------
24% ==========================================---------------------------------------------------------------------------------------------------------------------------------------
29% ====================================================-----------------------------------------------------------------------------------------------------------------------------
35% ==============================================================-------------------------------------------------------------------------------------------------------------------
41% =========================================================================--------------------------------------------------------------------------------------------------------
47% ===================================================================================----------------------------------------------------------------------------------------------
53% ==============================================================================================-----------------------------------------------------------------------------------
59% ========================================================================================================-------------------------------------------------------------------------
71% =============================================================================================================================----------------------------------------------------
76% =======================================================================================================================================------------------------------------------
88% ============================================================================================================================================================---------------------
94% =======================================================================================================================================================================----------
Receiving objects: 100% (17/17), 10.59 KiB | 0 bytes/s, done.
Checking connectivity... done.
$

Technical details

For the technical details see TECH.md.

Why is it called Mango?

I like using codenames when writing even proof of concepts. In any case it sounded nicer than ethergit.

The Ethereum ecosystem has a couple of white papers, two of them are:

  • the Yellow paper (EVM)
  • and the Orange paper (Swarm)

Considering that a mango can be yellow, orange, red or green based on its level of ripeness it fits in well :)

License

GPL v3

Copyright (C) 2016 Alex Beregszaszi

mango's People

Contributors

axic 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  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

mango's Issues

Status of the project

@axic Not sure if this is the right place to ask - but I wonder if this project may revive any time soon? (or is the work migrated to another repo?). The idea around backing the Git backend by a P2P network is very interesting.

crash on push

I get this when I push a new branch

/usr/local/lib/node_modules/git-remote-mango/node_modules/bignumber.js/bignumber.js:1209
            throw error;
            ^

BigNumber Error: new BigNumber() not a base 16 number:
    at raise (/usr/local/lib/node_modules/git-remote-mango/node_modules/bignumber.js/bignumber.js:1177:25)
    at /usr/local/lib/node_modules/git-remote-mango/node_modules/bignumber.js/bignumber.js:1165:33
    at new BigNumber (/usr/local/lib/node_modules/git-remote-mango/node_modules/bignumber.js/bignumber.js:212:28)
    at SolidityTypeString.formatOutputString [as _outputFormatter] (/usr/local/lib/node_modules/git-remote-mango/node_modules/web3/lib/solidity/formatters.js:217:19)
    at /usr/local/lib/node_modules/git-remote-mango/node_modules/web3/lib/solidity/type.js:237:25
    at SolidityTypeString.SolidityType.decode (/usr/local/lib/node_modules/git-remote-mango/node_modules/web3/lib/solidity/type.js:238:11)
    at /usr/local/lib/node_modules/git-remote-mango/node_modules/web3/lib/solidity/coder.js:219:29
    at Array.map (native)
    at SolidityCoder.decodeParams (/usr/local/lib/node_modules/git-remote-mango/node_modules/web3/lib/solidity/coder.js:218:26)
    at SolidityFunction.unpackOutput (/usr/local/lib/node_modules/git-remote-mango/node_modules/web3/lib/web3/function.js:90:24)

To mango://0x351765a6e711cbd86de7f2a8442c857ae095d7ad
 * [new branch]      master -> master
error: failed to push some refs to 'mango://0x351765a6e711cbd86de7f2a8442c857ae095d7ad'

Microsoft acquiring GitHub?

It would be a really good initiative to have Mango as the backend component for a github like front-end application. I would happily work towards this.

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.