我正在尝试使用Bitbucket Rest API和curl命令创建分支,如下所示:
curl -X POST -u <username>:<rest api token> "https://api.bitbucket.org/2.0/repositories/projectname/reponame" -d '{"scm": "git", "is_private": "true", "fork_policy": "no_public_forks", "project": {"name": "release1"} }'
这是我为curl命令输出想到的:
url: (6) Couldn't resolve host 'git,'
curl: (6) Couldn't resolve host 'is_private'
curl: (6) Couldn't resolve host 'true,'
curl: (6) Couldn't resolve host 'fork_policy'
curl: (6) Couldn't resolve host 'no_public_forks,'
curl: (6) Couldn't resolve host 'project'
curl: (3) [globbing] unmatched brace in column 1
curl: (3) [globbing] unmatched close brace/bracket in column 14
curl: (3) [globbing] unmatched close brace/bracket in column 1
请帮助我在哪里丢失或纠正curl命令以创建分支。
预先感谢
答案 0 :(得分:0)
> File (from menu bar)
> Settings
> Project: projectname
> Project interpreter
> click + and search for package
> Install packge
的输出看起来不是参数解析有问题。请像这样再次尝试:
curl
取决于您使用的是哪个操作系统和哪个终端来解析参数,其行为会有所不同。