defunkt/hub — Issue #123: Enterprise: Creating Pull Request shows incorrect info
Author: HighwayofLife
Created: 2011-12-22 00:55:15+00:00
State: open

Creating a Fork of a repo then creating a pull request using hub produces some interesting results...
Steps to reproduce:

$ GITHUB_HOST=github.enterprise.com git clone dalewis/repo
Cloning into 'repo' ...
$ cd repo; git checkout -b feature
//... do work
$ git commit -am "example message";git push origin feature
...
To git@github.enterprise.com:dalewis/repo.git
* [new branch] feature -> feature
$ git pull-request

The template that appears shows the following...

# Requesting a pull to dalewis:master from highwayoflife:feature
#
# ...

However, "highwayoflife" is my username on github, it's not used in our Enterprise domain. It should be requesting a pull into the source repo (in this example: "org"):

# Requesting a pull to org:master from dalewis:feature
#
# ...

Submitting the pull request produces an error...

Error creating pull request: (HTTP 401)
Check your token configuration (`git config github.token`)

This is likely because it's trying to create a pull request across domains (github.enterprise -> github)