Php 比特桶API-';非类型';对象没有属性';pk';
我正在使用BitBucket的PHP库创建存储库:Php 比特桶API-';非类型';对象没有属性';pk';,php,bitbucket,bitbucket-api,Php,Bitbucket,Bitbucket Api,我正在使用BitBucket的PHP库创建存储库: $repo = new \Bitbucket\API\Repositories\Repository(); $repo->setCredentials( new \Bitbucket\API\Authentication\Basic( $this->username, $this->password ) ); $slug = self::generateSlug( $domainName ); return $repo->
$repo = new \Bitbucket\API\Repositories\Repository();
$repo->setCredentials( new \Bitbucket\API\Authentication\Basic( $this->username, $this->password ) );
$slug = self::generateSlug( $domainName );
return $repo->create( $this->username, $slug, array(
'name' => $domainName,
'scm' => 'git',
'description' => "Project: {$domainName}",
'language' => 'php',
'is_private' => true,
'forking_policy' => 'no_public_forks',
));
但我得到的只是“非类型”对象没有属性“pk”
以前有人见过这个吗
问候是-今天看到这一点。我们开始了解用户名是否在int中有下划线。我想知道这是否是他们刚刚推出的API错误。看起来您可以像这样使用1.0 API:
curl -X POST -v -H "Content-Type: application/x-www-form-urlencoded" https://USERNAME:PASSWORD@api.bitbucket.org/1.0/repositories/ -d 'name=scott&scm=git'