分享

redmine Gerrit 通过API进行访问

 ala咪s 2017-07-13

Redmine Gerrit 通过 API 进行访问

行者赖 · 发布于 1 天前 · 16 次阅读
96

Gerrit通过API进行访问 Gerrit提供API方式进行访问,访问特定的接口返回指定的json数据。 默认Gerrit的配置不开启这个功能,需要进行配置修改。

  1. 修改配置文件 [auth] type = HTTP gitBasicAuth=true 新增gitBasicAuth=true
  2. 设置用户的HTTP访问token
  3. 在使用Gerrit的帮助文档中给出示例 curl --digest --user username:password http://localhost:8080/a/path/to/api/ 这里的用户名和密码为红色内容。 实际使用中这个—digest会加密导致无法访问需要去掉。 curl --user username:passwordhttp://localhost:8080/a/path/to/api/ 就可以正常返回数据。 Ruby有个名为gerry的gem可以访问Gerrit的数据,同样有这个验证的问题。

在使用Gerrit的帮助文档中给出示例 curl --digest --user username:password http://localhost:8080/a/path/to/api/ 这里的用户名和密码为红色内容。 实际使用中这个—digest会加密导致无法访问需要去掉。 curl --user username:passwordhttp://localhost:8080/a/path/to/api/ 就可以正常返回数据。 Ruby有个名为gerry的gem可以访问Gerrit的数据,同样有这个验证的问题。

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多