Issue Summary
Environment
The below fails for BambooServer 6.9.2. In Bamboo 5.15.3, acces to AWS CodeCommit worked for Git type, authetication with username and password and thus using HTTP protocol.
Steps to Reproduce
- Setting up a Linked repository to AWS CodeCommit of generic Git type using username & password
- The IAM user on AWS CodeCommit side has 'AWSCodeCommitFullAccess'
to the AWS CcodeCommit repository addresed in step 1
- All other requirements like 'credential helper' being set and further needed AWS CodeCommit configuration is set as should
Expected Results
It should be able to successfully connect to AWS CodeCommit.
Actual Results
When terminating the setup of the Linked repository to AWS CodeCommitand pressing button "Test connection" on the end of this configuration page, connecting to the repository is not possible getting message pop-up saying "Fatal: Unable to access and error 403.
This happens because Bamboo inserts the username and '@' specified into the URL which AWS CodeCommit is apparently not accepting.
This is common Bamboo procedure and e.g. works perfectly like that for Bitbucket Cloud or GitHub.
Notes
When running git clone from command-line on the box hosting Bamboo Server, with the same username and password but without username and '@' before the AWS CodeCommit URL, things work fine. Please see below.
Inserting the username like Bamboo Server does and running the same git clone, re-prints the same error message and errro 403 as Bamboo does when setting up the Linked repository for AWS CodeCommit. So it fails as shown below.
Workaround
- Use git commands from out of a Bamboo Script task and within those, only use the AWS CodeCommit URL, without username (as of the above note)
- You might use the SSH protocol and credentials for setting up a Linked repository for AWS CodeCommit. THough to succeed, you need toto configure: ~/.ssh/config, according to "SSH to codecommit: Step 3 #7" as of
Setup Steps for SSH Connections to AWS CodeCommit Repositories on Linux, macOS, or Unix
1. In repository settings set Authentication type: None
2. Save credentials in git credential helper
3. Add bamboo system property: bamboo.git.password.use.credentials.file=false
4. Enjoy