如何使用API和CURL将文件夹上载到bitbucket repo

如何使用API和CURL将文件夹上载到bitbucket repo,curl,bitbucket,bitbucket-api,bitbucket-cloud,Curl,Bitbucket,Bitbucket Api,Bitbucket Cloud,我可以将文件上载到bitbucket存储库,但有任何方法可以使用CURL和API上载文件夹。API的文档很少,但这对我来说是可行的: 使用cURL: curl --user <username:password> -X POST https://api.bitbucket.org/2.0/repositories/<workspace_name>/<repository_name>/src -F <local_file_name.ext>=@<

我可以将文件上载到bitbucket存储库,但有任何方法可以使用CURL和API上载文件夹。

API的文档很少,但这对我来说是可行的:

使用cURL:

curl --user <username:password> -X POST https://api.bitbucket.org/2.0/repositories/<workspace_name>/<repository_name>/src -F <local_file_name.ext>=@<destination_filename.ext>
一个警告,这似乎只是上传到主人,我不能让它上传到任何分支

curl --user Foo:Bar -X POST https://api.bitbucket.org/2.0/repositories/widgetcentral/testRepo/src -F sampleFile.txt=@sampleFile.txt