mislav / hub

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

Getting 403 error on attempt to create pull-request #314

Closed birarda closed 11 years ago

birarda commented 11 years ago

± git pull-request -b worklist:master github.com username: birarda github.com password for birarda (never stored): Error creating pull request: Forbidden (HTTP 403)

This is after deleting ~/.config/hub

Was working fine yesterday.

Raynos commented 11 years ago

Getting similar issues with hub create

raynos at raynos-Latitude-E5530-non-vPro in ~/Documents/routes-router on master
$ hub create
Error creating repository: Forbidden (HTTP 403)
ungoldman commented 11 years ago

+1 same error on attempted pull request

$ hub pull-request -b arcgis:dev-plans -h ngoldman:dev-plans -i 422
Error creating pull request: Forbidden (HTTP 403)
srgvg commented 11 years ago

+1 checking out a pull request

git checkout https://github.com/ansible/ansible/pull/2762 apt-timeout
/usr/lib/ruby/1.8/net/http.rb:2105:in `error!': 403 "Forbidden" (Net::HTTPServerException)
    from /home/serge/bin/hub:247:in `pullrequest_info'
    from /home/serge/bin/hub:1436:in `checkout'
    from /home/serge/bin/hub:1214:in `send'
    from /home/serge/bin/hub:1214:in `run'
    from /home/serge/bin/hub:1999:in `initialize'
    from /home/serge/bin/hub:2003:in `new'
    from /home/serge/bin/hub:2003:in `execute'
    from /home/serge/bin/hub:2053
Raynos commented 11 years ago

This patch https://github.com/defunkt/hub/pull/313 made my problem go away

ungoldman commented 11 years ago

Yup, adding req['User-Agent'] = 'Hub' after the line defining req (line 325 of bin/hub if you're brew installing hub) fixes it for me.

paulspringett commented 11 years ago

+1 also getting a 403

mislav commented 11 years ago

I suck, but thankfully @mjtamlyn fixed me. Please upgrade!

lexinator commented 11 years ago

+1.

I was using pull-request for first time and it kept failing with 403. I didn't dig deeper but does github give more details that hub could output? hub doesn't seem to have a --debug mode either (--noop is not sufficient)

mislav commented 11 years ago

For anyone experiencing 403s, please upgrade to v1.10.6

If someone wants to add debug mode to hub, it will be appreciated.