Permission denied error in git repo

I am trying to clone a git repo (which I can do) in an image build, but then cd to a specific folder in the repo, but getting a permission error. Is there

USER owner
WORKDIR /folder

RUN apk add --no-cache --virtual build_deps \
     git bash  \
&& git config --global url."https://${TOKEN}:@github.com/".insteadOf "https://github.com/" \
&& git clone https://${TOKEN}@github.com/repo/xxx.git --branch=main \
&& cd repo/folder

cd /repo/folder: permission denied

The directory the repo is cloned into is /folder which is owned by owner group owner… owner is in the /etc/passwd but the error persists. Thank you :slight_smile: