Say, I own mydomain.com and I also host this domain in Route 53. I want to set up a subdomain, say, git.mydomain.com pointing to codecommit host. For example, git.mydomain.com => git-codecommit.us-west-2.amazonaws.com
I created a CNAME record in Route 53 to do that. I think DNS did pick up the change.
Trying "git.mydomain.com"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8020
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;git.mydomain.com. IN ANY
;; ANSWER SECTION:
git.mydomain.com. 41 IN CNAME git-codecommit.us-west-2.amazonaws.com.
However, when I try to clone the reop by running
git clone ssh://git.mydomain.com/v1/repos/reponame
, I keep getting
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
It works when I just do
git clone ssh://git-codecommit.us-west-2.amazonaws.com/v1/repos/reponame
Do anyone know how to set this up properly?
Thank you very much.