方极客

人的一生是一场修行,国学大师南怀瑾将人生归结为三个阶段:莫名其妙的生来;无可奈何的活着;不知所以然的死掉。...

curl 操作github

1. 列出所有的库

curl -u zhu126fang https://api.github.com/user/repos | grep '"name":'

2. 查询确定的库

curl -u zhu126fang https://api.github.com/repos/zhu126fang/5ichai

3. 保存库信息后,再筛选库名

pi@raspberrypi ~ $ curl -u zhu126fang https://api.github.com/user/repos >>github.json
Enter host password for user 'zhu126fang':
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  153k  100  153k    0     0  58744      0  0:00:02  0:00:02 --:--:-- 66999
pi@raspberrypi ~ $ cat github.json | grep '"name":'
    "name": "12306",
    "name": "5ichai",
    "name": "bakingpi-www",
    "name": "Chart.js",
    "name": "Codesys",
    "name": "Demo1",
    "name": "FruityWifi",
    "name": "Hello-Word",
    "name": "jekyll-bootstrap",
    "name": "leanote",
    "name": "linux",
    "name": "mplayer_study",
    "name": "openwrt",
    "name": "os_diy",
    "name": "platform-samples",
    "name": "PyDDE",
    "name": "raspberry",
    "name": "webpy",
    "name": "zhu126fang.github.com",

4. curl创建库

pi@raspberrypi ~ $ curl -u zhu126fang -d '{"name":"Hello-Word","description":"This is our first repository"}' https://api.github.com/user/repos


阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhu126fang/article/details/49202823
个人分类: Github curl
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭