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

meyer1994/ipgit: Inter Planetary Git

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

开源软件名称:

meyer1994/ipgit

开源软件地址:

https://github.com/meyer1994/ipgit

开源编程语言:

Python 94.0%

开源软件介绍:

Inter Planetary GIT

build standard-readme compliant

Because it is possible!

Table of Contents

About

I think web 3.0 future is promising. I like the idea of a distributed web. As a consequence, I like IPFS. It is such a cool concept. However, in my opinion, most people do not use it because it is hard to do so. Go? Running a Docker container in my machine? What? Can't I just use it as a simple tool or service?

Yes, you can.

This is why I created this, extremely simple and limited, web application. It is just an endpoint. A git remote, for the tech savy. You can configure with one bash command and just use it. See the (small) example below:

$ git remote add ipfs http://ipgit.herokuapp.com/
$ git push ipfs
remote: Resolving deltas: 100% (53/53), done.
remote: IPFS hash:
remote: QmU8wwg65D2MpbumSKPTWUhydmAin5jmXbwNhxUWzyeXs1

It works the other way around as well. If you want, you can use it to clone git repositories that are stored in IPFS.

$ git clone https://ipgit.herokuapp.com/QmZUnAU4Vn7DvDHEnJ1dz2uV2dimf79HNXdffgY9MbQGWP
Cloning into 'QmZUnAU4Vn7DvDHEnJ1dz2uV2dimf79HNXdffgY9MbQGWP'...
$ ls QmZUnAU4Vn7DvDHEnJ1dz2uV2dimf79HNXdffgY9MbQGWP/
Dockerfile  Makefile  app.py  git.py  heroku.yml  post-update  requirements.txt  sender.py

That is it! No installation, no requirements. Just plain old git.

Your files will be pinned by default. However, because heroku shuts down the after some inactivity time, it is not guarantee that your files will be there when you need them. You should try pinning them into some file pinning service to avoid loosing it.

Install

This project uses fastapi and uvicorn for server interactions. IPFS needs to be running on the local machine for the server to start. And, obviously, you will need git installed.

$ pip install -r requirements.txt

Usage

To run a local version of this project, just execute:

$ ipfs daemon --init
$ uvicor app:app --reload
$ make local  # optional

make local adds a local remote on http://localhost:8000 for development. When developing, you can simply test your modification by calling git push local.

Thanks

This project would not have been possible without the code in the following repositories. They helped me understand a lot about git http backend.




鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
qri-io/go-ds-s3: IPFS datastore interface implementation for AWS S3发布时间:2022-06-23
下一篇:
testground/testground: 发布时间:2022-06-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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