Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

pull-request failed to pick up a project #259

Closed
Pridesama opened this Issue Nov 13, 2012 · 4 comments

Comments

Projects
None yet
2 participants

Hi, thanks for this convenient script

my current issue is the git address is not github but git.corp

seems like the local_repo is not the one it should to be

there's no main_project or any properties defined in context.rb

the config file is exactly same as a common git project except the git suffix

what's wrong with it?

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = git@git.corp.mycorp.com:user/project.git
[branch "master"]
    remote = origin
    merge = refs/heads/master
#<struct Hub::Context::LocalRepo 
git_reader=#<Hub::Context::GitReader:0x0000000497fcd0 
    @executable=["git"], 
    @cache={"config --get alias.pull-request"=>nil, "rev-parse -q --git-dir"=>".git", 
        "remote"=>"origin\nupstream", 
        "remote -v"=>"origin\tgit@git.corp.mycorp.com:user/project.git (fetch)\n
                                 origin\tgit@git.corp.mycorp.com:user/project.git (push)\n
                                 upstream\tgit@git.corp.mycorp.com:user/project.git(fetch)\n
                                 upstream\tgit@git.corp.mycorp.com:MainDB/project.git (push)",
        "config --get-all hub.host"=>nil,
         "symbolic-ref -q HEAD"=>"refs/heads/abranch", 
         "rev-parse --symbolic-full-name abranch@{upstream}"=>nil
}>, 
dir="local path of project">
Aborted: the origin remote doesn't point to a GitHub repository.

hub requires the url as git@github.com/xx ?

Member

mislav commented Nov 13, 2012

See "GitHub Enterprise" section in hub help hub. I presume that "git.corp.mycorp.com" is a GH Enterprise installation? Then you have to do:

git config --global --add hub.host git.corp.mycorp.com

@mislav mislav closed this Nov 13, 2012

sorry to bother u

yes, it's a GH Enterprise, the host is added.

and, i run the cmd by a headless account and using ssh key

sudo -u someAccount git pull-request

it always prompt me

the origin remote doesn't point to a GitHub repository

and if i gonna use git pull-request directly, enter my headless account of Git and ssh keys, it will prompt HTTP 403

Member

mislav commented Nov 22, 2012

OK, if you think you're doing everything right, let's see if this is a bug. But I need more info:

  • what is a "headless" account?
  • git config --global --get-all hub.host (you can anonymize results) for the system user who's running hub commands?
  • cat ~/.config/hub (you should anonymize results) for the system user who's running hub
  • what do you mean by "if i use git pull-request directly"?
  • can you paste the full GitHub 403 error?

My guess here is that, because you're using multiple Unix and/or GitHub accounts, you have configured hub.host for the Enterprise host for the wrong system user.

@mislav mislav reopened this Nov 22, 2012

Member

mislav commented Jul 16, 2013

Closing due to lack of info

@mislav mislav closed this Jul 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment