是否有可能使用他們的REST API來重命名Bitbucket上的現有存儲庫? 我閱讀了Bitbucket API的整個文檔,但是我找不到任何與遠程相關的東西。 我在問也許我錯過了一些東西。謝謝!有沒有辦法使用他們的API來重命名Bitbucket上的存儲庫
回答
根據https://confluence.atlassian.com/display/BITBUCKET/repository+Resource+1.0:
PUT https://api.bitbucket.org/1.0/repositories/{accountname}/{repo_slug} --data "name=new name"
這使得更新信息庫的可視名稱。
在unix shell中,您可以使用cURL;
curl https://api.bitbucket.org/1.0/repositories/{accountname}/{old_repo_name} --data "name=new_repo_name" -X PUT
是否有可能爲用戶在私有倉庫進行身份驗證,但仍然只有管理員能夠執行:
curl https://USER:[email protected]/1.0/repositories/{accountname}/{old_repo_name} --data "name=new_repo_name" -X PUT
據這裏的最新的API是正確的curl命令:
curl -X PUT --user username:password https://bitbucket.org/api/1.0/repositories/{accountname}/{repo_slug} --data "name=newRepoName"
請注意,repo_slug是存儲庫名稱IN LOWER CASE。如果你沒有全部用小寫,你會得到不那麼富有表現力的答案「未找到」。
如果你不知道什麼是存儲庫蛞蝓執行下面的命令,它會顯示該用戶的信息,包括當前的存儲庫,並查找場「鼻涕蟲」
curl --user username:password https://bitbucket.org/api/1.0/user
使用到位桶網站,你可以如下重命名回購:
- 轉到回購的概述頁面,通常
https://bitbucket.org/username/oldname/overview
- 點擊菜單行的最右端的設置COG!
- 而不是1.和2.你可以鍵入
'r'
然後'a'
管理。 - 更改
Name
字段中的名稱。 - 點擊
Save repository details.
注意,改變回購的名稱將改變它的URL訪問過。以前的訪問是https://[email protected]/username/oldname.git
但是,現在回購的URL /路徑將爲https://[email protected]/username/newname.git
您可以通過返回Overview頁面並將鼠標懸停在藍色的大藍色HTTPS按鈕上進行檢查。你的瀏覽器的底部會顯示如果您正在使用SourceTree您可以通過突出SourceTree當地回購和更新遠程的URL,然後
- 點擊
Repository
- 點擊
Repository Settings...
,它現在指向https://[email protected]/username/newname.git
- 突出顯示包含遠程分支的行。通常
origin https://[email protected]/username/oldname.git
- 點擊
Edit
- 更新
URL/Path
字段。將「oldname.git」更改爲「newname.git」,其餘部分保持不變。因此,完整的路徑應該是https://[email protected]/username/newname.git
- 點擊
OK
如果您找不到設置按鈕,它目前在左下角「隱藏」。 – arni 2014-06-02 15:18:01
- 1. 有沒有辦法使用他們的API將URL的內容上傳到Dropbox?
- 2. 有沒有辦法容納位於bitbucket存儲庫中的css文件
- 3. Bitbucket Server Api:克隆所有存儲庫
- 4. 有沒有辦法使用bitbucket來分離Subversion項目?
- 5. 有沒有辦法用koa重命名上傳圖像?
- 6. 有沒有辦法加入他們?
- 7. 有沒有辦法可以選擇不filepicker.io存儲您的上傳到他們的服務器/數據庫?
- 8. 有沒有辦法使用他們的API向Facebook發送轉換事件?
- 9. 使用BitBucket的API來分發存儲庫
- 10. 有沒有辦法克隆包括其遠程存儲庫的git存儲庫?
- 11. 有沒有辦法來防止重複圖片上傳到firebase存儲
- 12. 有沒有辦法來棄用一個命名空間?
- 13. 主塔:響應重命名?有沒有更好的辦法?
- 14. 有沒有辦法重命名Facebook的「發送」按鈕?
- 15. 有沒有辦法重新命名由D3創建的類?
- 16. 有沒有辦法來處理存儲的信息
- 17. 有沒有辦法使用紅寶石命名空間的ctags?
- 18. 有沒有辦法如何使用c + +中的libgit2來遠程存儲庫上的提交?
- 19. 有沒有辦法來存儲/緩存InputStream?
- 20. 有沒有辦法知道誰下載我的Github存儲庫
- 21. 有沒有辦法使用谷歌雲存儲目標c api的SPDY?
- 22. 有沒有辦法使用LotusScript存儲新的代理屬性?
- 23. 有沒有辦法修改Django FileField使用的存儲後端?
- 24. 有沒有辦法來命名空間的PORO類沒有模塊
- 25. HDF5:有沒有辦法重命名現有HDF5表中的列名?
- 26. 使用Sourcetree客戶端來存儲Bitbucket存儲庫上的Maya文件
- 27. BitBucket 1.0 REST API檢索存儲庫的所有Pull-Requests
- 28. Azure:有沒有辦法緩存/重用從Azure blob存儲下載的文件?
- 29. 有沒有辦法使用intelliJ創建Pull請求到bitbucket git倉庫IDEA
- 30. Bitbucket存儲庫
謝謝!我不知道我是怎麼錯過的。 – crazybyte 2013-02-20 12:13:19
碰巧發生在我們身上:) – SirDarius 2013-02-20 14:46:56