Drupal.org

Co-maintainer getting permissions error on push: Cannot access URL http://git.drupal.org/project/nagios.git/, return code 22

Project:Drupal.org infrastructure
Component:Git
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (works as designed)

Issue Summary

Hi,

kbahey has made me co-maintainer of the Nagios module (he emailed me to tell me and, indeed, I can edit the project node) but I can't seem to push to Git. I'm not sure if this is a problem with the infrastructure or he simply forgot a step. Project is at:
http://drupal.org/project/nagios

Full output from terminal after applying the patch I'm trying to commit is:

[gharvey@greg-hp nagios]$ git branch
* 6.x-1.x
[gharvey@greg-hp nagios]$ git pull
Already up-to-date.
[gharvey@greg-hp nagios]$ git add -A
[gharvey@greg-hp nagios]$ git commit -m "Issue #764576 by helmo: Removes unnecessary shift while processing the -S option for Nagios utils.sh."
[6.x-1.x 88d2924] Issue #764576 by helmo: Removes unnecessary shift while processing the -S option for Nagios utils.sh.
1 files changed, 0 insertions(+), 1 deletions(-)
[gharvey@greg-hp nagios]$ git status
# On branch 6.x-1.x
# Your branch is ahead of 'origin/6.x-1.x' by 1 commit.
#
nothing to commit (working directory clean)
[gharvey@greg-hp nagios]$ git push origin 6.x-1.x
error: Cannot access URL http://git.drupal.org/project/nagios.git/, return code 22
fatal: git-http-push failed
[gharvey@greg-hp nagios]$

Comments

#1

What does your .git/config say? My .git/config file for the nodewords project, where I'm co-maintainer, says:

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = damienmckenna@git.drupal.org:project/nodewords.git
[branch "6.x-1.x"]
remote = origin
merge = refs/heads/6.x-1.x
[branch "master"]
remote = origin
merge = refs/heads/master

Did you verify that you were actually given git write permission?

#2

I checked http://drupal.org/node/368588/maintainers and you are listed as a maintainer with all the neccessary permissions.

#3

Status:active» closed (works as designed)

You can only push over ssh. Create a new remote using the git instructions for the module.

#4

Ah ha! Thank you! Works.

#5

Yeah I just encountered this today too. Edited my .git/config to use the ssh URL and a push worked.

#6

root@DT-63:~# git clone --branch 6.x-1.x http://git.drupal.org/project/node_import.git
Initialized
empty Git repository in /root/node_import/.git/
remote: Counting objects: 1836, done.
remote: Compressing objects: 100% (691/691), done.
remote: Total 1836 (delta 1186), reused 1662 (delta 1061)
Receiving objects: 100% (1836/1836), 517.73 KiB | 45 KiB/s, done.
Resolving deltas: 100% (1186/1186), done.
root@DT-63:~# cd node_import
root@DT-63:~/node_import# git status
# On branch 6.x-1.x
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified:   node_import.inc
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
# supported/cck/rolereference.inc
no changes added to commit (use "git add" and/or "git commit -a")
root@DT-63:~/node_import# git add .
root@DT-63:~/node_import# git status
# On branch 6.x-1.x
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
# modified:   node_import.inc
# new file:   supported/cck/rolereference.inc
#
root@DT-63:~/node_import# git commit -m "support to role reference added"
[6.x-1.x 603f6f4] support to role reference added
Committer: root <root@DT-63.(none)>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you@example.com

If the identity used for this commit is wrong, you can fix it with:

    git commit --amend --author='Your Name <you@example.com>'

2 files changed, 106 insertions(+), 93 deletions(-)
create mode 100644 supported/cck/rolereference.inc
root@DT-63:~/node_import# git tag 6.x-1.2
root@DT-63:~/node_import# git push origin tag 6.x-1.2
error: Cannot access URL http://git.drupal.org/project/node_import.git/, return code 22
fatal: git-http-push failed

Cannot access URL http://git.drupal.org/project/node_import.git/, return code 22.

How can i make this work.

#7

@Drupalnator: Make sure you have followed the 'Setting up this repository in your local environment for the first time' section under your project's 'Version control' help from the project page.

#8

Config in #1 did the trick. Just had to change the

url = http://git.drupal.org/project/REPOSITORYNAME.git

to

url = USERNAME@git.drupal.org:project/REPOSITORYNAME.git