mislav / hub

A command-line tool that makes git easier to use with GitHub.
https://hub.github.com/
MIT License
22.83k stars 2.2k forks source link

hub merge returning Error getting Pull request : Not found #2609

Open aydamacink opened 4 years ago

aydamacink commented 4 years ago

Hello, I am experiencing the following problem:

Command attempted: hub merge https://github.com/orga_name/project_name/pull2323

What happened: Error getting pull request: Not Found (HTTP 404) Not Found Though the PR does exist

More info:

I am setting hub on my new computer because it is what our organization uses. I already created a personal token We have 2 Factor authentication but I cannot disable it, since the organization requires it. I also added a ~/.config/hub with the token as has been suggested and tried the environment variables setup but it also didn't work

- user: aydamacink
  oauth_token: token
  protocol: https
hub version
git version 2.24.3 (Apple Git-128)
hub version 2.14.2
macOS Catalina 10.15.6 

output of -- verbose

HUB_VERBOSE=1 hub merge https://github.com/organization/project/pull/2323
$ git config --get-all hub.host
> GET https://api.github.com/user
> Authorization: token [REDACTED]
> Accept: application/vnd.github.v3+json;charset=utf-8
< HTTP 200
< X-Oauth-Scopes: read:packages
{"login":"aydamacink","id":11429194,"node_id":"MDQ6VXNlcjExNDI5MTk0","avatar_url":"https://avatars0.githubusercontent.com/u/11429194?v=4","gravatar_id":"","url":"https://api.github.com/users/aydamacink","html_url":"https://github.com/aydamacink","followers_url":"https://api.github.com/users/aydamacink/followers","following_url":"https://api.github.com/users/aydamacink/following{/other_user}","gists_url":"https://api.github.com/users/aydamacink/gists{/gist_id}","starred_url":"https://api.github.com/users/aydamacink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aydamacink/subscriptions","organizations_url":"https://api.github.com/users/aydamacink/orgs","repos_url":"https://api.github.com/users/aydamacink/repos","events_url":"https://api.github.com/users/aydamacink/events{/privacy}","received_events_url":"https://api.github.com/users/aydamacink/received_events","type":"User","site_admin":false,"name":"Dayana Mick","company":null,"blog":"","location":null,"email":null,"hireable":null,"bio":null,"twitter_username":null,"public_repos":20,"public_gists":1,"followers":9,"following":9,"created_at":"2015-03-11T18:40:49Z","updated_at":"2020-09-08T09:47:38Z"}
> GET https://api.github.com/repos/marleyspoon/api/pulls/2323
> Authorization: token [REDACTED]
> Accept: application/vnd.github.v3+json;charset=utf-8
< HTTP 404
< X-Oauth-Scopes: read:packages
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/pulls#get-a-pull-request"}

I would be super grateful for any help I could get. Thanks in advance!

mislav commented 4 years ago

@aydamacink Thank you for reporting!

Is it possible that aydamacink does not have access to the organization/project repository, or that PR #2323 does not exist? This looks like a legitimate 404 error to me.