jeffwidman / bitbucket-issue-migration

A small script for migrating repo issues from Bitbucket to GitHub
GNU General Public License v3.0
316 stars 95 forks source link

401 errors #1

Closed bdarcus closed 13 years ago

bdarcus commented 13 years ago

The readme says "The script will also throttle the amount of requests it makes per minute to avoid the 60 request per minute limit that github enforces." But in trying this out just now, I'm getting 401 errors from github.

Traceback (most recent call last):
  File "migrate.py", line 153, in <module>
    title=issue.get('title').encode('utf-8'),
  File "/usr/local/lib/python2.7/dist-packages/github2/issues.py", line 53, in open
    filter="issue", datatype=Issue)
  File "/usr/local/lib/python2.7/dist-packages/github2/core.py", line 50, in get_value
    value = self.make_request(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/github2/core.py", line 41, in    make_request
    **post_data)
  File "/usr/local/lib/python2.7/dist-packages/github2/request.py", line 70, in post
    method="POST")
  File "/usr/local/lib/python2.7/dist-packages/github2/request.py", line 84, in make_request
    result = self.raw_request(url, extra_post_data, method=method)
  File "/usr/local/lib/python2.7/dist-packages/github2/request.py", line 115, in raw_request
    response.status, response_text))
RuntimeError: unexpected response from github.com 401: ' '

Not sure it makes any difference, but I'm trying to sync to an org account repo.

vbabiy commented 13 years ago

Make sure you have full admin right on the new repo. Since you are getting a 401, this makes more sense.

http://www.checkupdown.com/status/E401.html

bdarcus commented 13 years ago

I'm an owner for both the org and the specific repo I'm trying to sync with. I created both of them, in fact.

But the error (I just realized) is that I specified the org as the github user, rather than myself. When I changed it to my personal user name (but still using the org api token), it worked.

Could you perhaps add a note about this to the readme?

vbabiy commented 13 years ago

Could you add it and submit a pull request?

bdarcus commented 13 years ago

done.

On Sat, Mar 19, 2011 at 1:21 PM, vbabiy reply@reply.github.com wrote:

Could you add it and submit a pull request?

Reply to this email directly or view it on GitHub: https://github.com/vbabiy/bitbucket_issue_migration/issues/1#comment_893267

vbabiy commented 13 years ago

Thank you.