Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-2548

API: can't seem to create repositories (BB-1356)

    XMLWordPrintable

Details

    Description

      I can list repositories over the API (including private ones) just fine, but I've been trying to use it to create repositories with no luck.

      I've tried following the docs, but it never seems to work. For example this:

      curl -uuser:password -X POST -d "name=testapicreate" https://api.bitbucket.org/1.0/repositories/

      .. just dumps a stack trace:
      {{{
      #!python

      Piston/0.2.3rc1 (Django 1.2.5) crash report:

      Traceback (most recent call last):

      File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/local/env/lib/python2.7/site-packages/django_piston-0.2.3rc1-py2.7.egg/piston/utils.py", line 91, in wrap
      if form.is_valid():

      File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/local/env/lib/python2.7/site-packages/django/forms/forms.py", line 121, in is_valid
      return self.is_bound and not bool(self.errors)

      File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/local/env/lib/python2.7/site-packages/django/forms/forms.py", line 112, in _get_errors
      self.full_clean()

      File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/local/env/lib/python2.7/site-packages/django/forms/forms.py", line 267, in full_clean
      self._clean_fields()

      File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/local/env/lib/python2.7/site-packages/django/forms/forms.py", line 287, in _clean_fields
      value = getattr(self, 'clean_%s' % name)()

      File "/opt/python/domains/bitbucket.org/2010-09-28/bitbucket/../bitbucket/apps/bb/forms.py", line 44, in clean_name
      if Repository.objects.filter(owner=self.user,

      AttributeError: 'RepositoryForm' object has no attribute 'user'
      }}}

      Assistance would be welcome.

      Attachments

        Activity

          People

            6995b9ed1710 evzijst
            7ebac096eb51 sinbad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: