Hi,
I am trying to run atlassian pipeline with my private repo. Having created Dockerfile like this:
FROM golang:1.11
RUN mkdir /root/.ssh/
ADD bitbucket.org /root/.ssh/id_rsa
RUN touch /root/.ssh/known_hosts
RUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts
RUN git config --global url.ssh://git@bitbucket.org/.insteadOf https://bitbucket.org/
COPY . /build
WORKDIR /build
RUN make build
Where bitbucket.org is the private SSH cert with the public key added in to the repo keys section. "make build" command does go app build with go modules on.
During the go modules downalod im getting 403 error as soon as go tries to access my private repo.
This docker build works just fine on local machine with ordinal docker build command.
Response is:
<span><a href="https://api.bitbucket.org/2.0/repositories/arkadyb/chatbot?fields=scm" target="_blank" rel="nofollow noopener noreferrer">https://api.bitbucket.org/2.0/repositories/arkadyb/myrepo?fields=scm:</a> 403 Forbidden</span>
What am i doing wrong?