• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

axic/mango: Mango: Git, completely decentralised.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

axic/mango

开源软件地址:

https://github.com/axic/mango

开源编程语言:


开源软件介绍:

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




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
mirage/ocaml-git: Pure OCaml Git format and protocol发布时间:2022-06-11
下一篇:
dspinellis/git-issue: Git-based decentralized issue management发布时间:2022-06-11
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap