Changing SSH Default Port for Linked Stash

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Bamboo and Stash are integrated and Stash is added as a linked repository. Trying to configure Stash to use a non-default SSH port now (Ex.:8090, instead of the default 7999) doesn't seem to work. Port 7999 stays in use and following error shows up when trying to clone from the Stash server:

(com.atlassian.bamboo.repository.RepositoryException : java.lang.RuntimeException: com.atlassian.bamboo.plugins.stash.repository.StashRepositoryException: com.atlassian.bamboo.repository.RepositoryException: : ssh://git@xx.xx.xx.xx:7999/xx/xx.git: java.net.ConnectException: Connection refused)

原因

Bamboo stores Stash port information when repository definition is created. So when changing Stash SSH port settings after having the repository in place, bamboo is not aware of that change and will use old data. It's unfortunately not possible to change this information from the UI. 

We have an open improvement request to change this behavior: Bamboo should not store Stash SSH port in repository definition but rather use the currently configured one.

ソリューション

There are two ways to fix this issue:

  • For each plan edit the repository and re-select server/repository/branch,  this should overwrite the port settings
  • Modify settings directly in the database (Doable if you use external DB engine and some DB management tool). Make sure to back up your Bamboo database, stop Bamboo completely and check for the occurrences of the old/default port in "repositoryUrl". The run a command similar to the following to replace the port:

    UPDATE VCS_LOCATION SET XML_DEFINITION_DATA = REPLACE(XML_DEFINITION_DATA, '7999', '8090');
最終更新日 2014 年 7 月 25 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.