Gitlab repository access to the gitlab-runner

I am trying to use gitlab CI on a private repository. I created a gitlab-runner on my linux server machine and in my ./gitlab-ci.yml file, I am calling a script on the same server which goes to the repository directory there(cd /home/someuser/some-directory) and does a git pull(which is enabled for “someuser”). This was working for a public test repository I created to test the flow but for this private repository, I am unable to make it work. It gives me the following error -

Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Can anybody help me out here?