Community Tip - You can change your system assigned username to something more personal in your community settings. X
In CB 2.1.0.0, I am trying to add an existing GitHub repository under the SCM Repositories tab for a project. It prompts me for the repository name, URL, username, password, and the SCM loop setting. However, when I attempt to save I get the error:
SCM Error: remote: Support for password authentication was removed on August 13, 2021. remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication. fatal: Authentication failed for 'https://github.com/pathto/repo'
I did see a reference to using sshpass so I installed that and restarted CB but it didn't give me an SSH option and I'm still limited to the username/password. How can I add the external GitHub repo?
Solved! Go to Solution.
Hi,
You don't have to add external repositories such as GitHub under the SCM tab.
You need to set a secret for github, make sure you have rest api permissions and set up the webhook in GitHub. The first push will create the repository in codebeamer.
https://support.ptc.com/help/codebeamer/r2.1/en/index.html#page/codebeamer/user_guide/3825088.html#
Okay, I guess that makes sense. In this case I have a local docker instance of Codebeamer with no possibility of port forwarding to that instance so I was thinking Codebeamer would reach out to GitHub which, as I think about it, doesn't really make sense and GitHub would really be the one pushing to Codebeamer when commits are pushed. So in this case I can't really do what I unless I can get the networking updated to allow traffic from the Internet to my laptop.
So what is the "Use Existing External Repository" option for?
There are other types of supported external repositories where this option is used (e.g. Perforce). Also, as far as I remember in past cb versions (up until 20.11 maybe) you had to add GitHub repos manually as well.
So then I really only need to add to the application configuration:
"scc": {
"github" : {
"secretToken" : "mysecret"
}
}
Then create the webhook in my GitHub repo pointing to https://codebeamer.public.com/cb/rest/scm/github/{projectId}.
If that is the case, then how do I distinguish between multiple GitHub repositories for different projects? Is this just a single global token that must be configured in a webhook for each GitHub repo?