dongtan8532
dongtan8532
采纳率0%
2013-01-31 22:15

与gitolite一起使用围棋语言

已采纳

Does know how to use Google's go languages clever get command with Gitolite? It works great with Google Code and Github as follows:

go get code.google.com/p/go.example/hello

or

go get github.com/alphazero/Go-Redis

But my gitolite access look more like:

git clone git@mygitolite:myproject

Any suggestions?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答

  • douliangbian7323 douliangbian7323 8年前

    It has nothing to do with gitolite.
    Gitolite is just an authorization layer, which will accept or deny your git clone/push/pull command, depending on your username.

    If you can declare a git repo as a source for go, you can use it.
    Gitolite will just check who you are, but won't otherwise affect how that repo is used with go.


    The OP Peter Krnjevic refines the issue:

    The thing with go, is that it pulls the repo name from the directory structure, so for instance:

    ~/gocode/src/github.com/me/myproject 
    

    is automagically transformed into

    git clone github.com/me/myproject. 
    

    But how can gitolite names be transformed into a path?

    I don't think you need to transform anything: if go is able to contact your git repo (GitHub or any other hosting repo server), gitolite will intercept the command and validate it (or deny it).
    You can plug gitolite on top of ssh or (as it is the case with git request done by go import) with https.

    But the main point is:

    • gitolite is on the server side
    • you should use it with an Apache sever (like, for instance, with my config), and not ssh, if you want to easily have your repos accessed with go imports.
    点赞 评论 复制链接分享
  • dongxia527680 dongxia527680 8年前

    I wrote a tool just for this use-case. See if it helps.

    https://github.com/tuxychandru/gorepos

    点赞 评论 复制链接分享