Skip to content
Snippets Groups Projects

allow all git-upload-* commands for deploy keys

Merged gitlab-qa-bot requested to merge github/fork/jzi/allow_archive_for_deploy_key into master

Created by: jzi

This allows performing a git archive command using a deploy key (see http://feedback.gitlab.com/forums/176466-general/suggestions/3712377-easier-deploy-with-deploy-key). Tests included.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Unable to load the diff
  • Created by: jacobvosmaer

    It would be nicer to have a constant DOWNLOAD_COMMANDS = %w{ git-upload-pack git-upload-archive }. In line 36 we could then say when *DOWNLOAD_COMMANDS.

    By Administrator on 2013-07-30T08:16:29 (imported from GitLab project)

    By Administrator on 2013-07-30T08:16:29 (imported from GitLab)

  • gitlab-qa-bot
  • Unable to load the diff
    • Created by: jzi

      OK, good idea, I'll improve this, but are you sure it should be called DOWNLOAD_COMMANDS? From the remote's point of view those are uploads, as reflected by the command names, so this could cause some confusion. Maybe READ_COMMANDS and WRITE_COMMANDS would be more informative?

      By Administrator on 2013-07-30T08:16:29 (imported from GitLab project)

      By Administrator on 2013-07-30T08:16:29 (imported from GitLab)

  • gitlab-qa-bot
  • Unable to load the diff
    • Created by: jacobvosmaer

      Good point. Naming is always difficult :)

      Elsewhere in this method we have action names such as :download_code and :push_code. How about creating constants DOWNLOAD_COMMANDS and PUSH_COMMANDS? Then we can translate the git-xxx names into internal names in one spot and name the constants along the same lines as the authorization actions.

      By Administrator on 2013-07-30T08:16:29 (imported from GitLab project)

      By Administrator on 2013-07-30T08:16:29 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling 4664cb21b37c0268644a5f885612ecbd9175ae17 on jzi:allow_archive_for_deploy_key into b55e22e2 on gitlabhq:master.

    By Administrator on 2013-07-29T14:42:03 (imported from GitLab project)

    By Administrator on 2013-07-29T14:42:03 (imported from GitLab)

  • Created by: jzi

    So the CI build failed because of bundle install timing out - any way to trigger another build other than adding a commit?

    By Administrator on 2013-07-30T07:07:38 (imported from GitLab project)

    By Administrator on 2013-07-30T07:07:38 (imported from GitLab)

  • Created by: jojosch

    you can restart the Travis job by visiting the (failed) build page. On the top right there is a drop down menu which should have a "Restart Job" item. (or the complete build by visiting the build page)


    Alternatively you could amend your last commit and force-push.

    By Administrator on 2013-07-30T07:19:03 (imported from GitLab project)

    By Administrator on 2013-07-30T07:19:03 (imported from GitLab)

  • Created by: coveralls

    Coverage Status

    Coverage decreased (-0%) when pulling e03d01d0 on jzi:allow_archive_for_deploy_key into 79bea312 on gitlabhq:master.

    By Administrator on 2013-07-30T08:41:45 (imported from GitLab project)

    By Administrator on 2013-07-30T08:41:45 (imported from GitLab)

  • Created by: dzaporozhets

    thank you

    By Administrator on 2013-07-30T11:22:32 (imported from GitLab project)

    By Administrator on 2013-07-30T11:22:32 (imported from GitLab)

  • Created by: stp-ip

    http://feedback.gitlab.com/forums/176466-general/suggestions/3712377-easier-deploy-with-deploy-key would be solved by this.

    By Administrator on 2013-08-12T23:01:15 (imported from GitLab project)

    By Administrator on 2013-08-12T23:01:15 (imported from GitLab)

  • gitlab-qa-bot
  • 121 147 action: 'git-receive-pack'
    122 148 )
    123 149 end
    150
    151 def archive(key, project)
    152 get(
    153 api("/internal/allowed"),
    154 ref: 'master',
    • Created by: eddiemonge

      why is master hardcoded? It should be customizable

      By Administrator on 2014-06-06T22:32:12 (imported from GitLab project)

      By Administrator on 2014-06-06T22:32:12 (imported from GitLab)

  • gitlab-qa-bot
  • 121 147 action: 'git-receive-pack'
    122 148 )
    123 149 end
    150
    151 def archive(key, project)
    152 get(
    153 api("/internal/allowed"),
    154 ref: 'master',
    • Created by: Razer6

      You are referring to the testbench. This is not the code for the actual feature!

      By Administrator on 2014-06-06T22:48:12 (imported from GitLab project)

      By Administrator on 2014-06-06T22:48:12 (imported from GitLab)

  • gitlab-qa-bot
  • 121 147 action: 'git-receive-pack'
    122 148 )
    123 149 end
    150
    151 def archive(key, project)
    152 get(
    153 api("/internal/allowed"),
    154 ref: 'master',
    • Created by: eddiemonge

      Ah. Well my question still stands as it archive doesn't take ref in the API but does in the non-API

      By Administrator on 2014-06-06T22:59:00 (imported from GitLab project)

      By Administrator on 2014-06-06T22:59:00 (imported from GitLab)

  • gitlab-qa-bot
  • 121 147 action: 'git-receive-pack'
    122 148 )
    123 149 end
    150
    151 def archive(key, project)
    152 get(
    153 api("/internal/allowed"),
    154 ref: 'master',
    • Created by: Razer6

      Please can you refer to current code please? This code is nearly a year old and things might have changed.

      By Administrator on 2014-06-07T07:03:18 (imported from GitLab project)

      By Administrator on 2014-06-07T07:03:18 (imported from GitLab)

    Please register or sign in to reply
    Loading