I am trying to clone a project from gitlab using GO CI/CD pipeline. Steps i did as below,
- I already have ssh key which i have added to gitlab.
- tried to clone from my local machine and i am able to clone using "git clone" command
- I also tried on the Go-agent server using command "git clone" and project is cloned there.
- After clone the project I opened the ssh folder and "known_hosts" file is modified with some key. So i have placed the ssh folder at "C:\Windows\System32\config\systemprofile" location because GO- CD pipeline looks there only.
- But whenever i am trying to test the connection of pipeline it says access denied. below is the error
:
Repository ssh://git@gitlab.demo.com/exampleproject/someproject.git not found! :
Error performing command: --- Command ---
git ls-remote ssh://git@gitlab.demo.com/exampleproject/someproject.git
--- Environment ---
{}
--- INPUT ----
--OUTPUT ---
--- ERROR ---
STDERR: Host key verification failed.
STDERR: fatal: Could not read from remote repository.
STDERR:
STDERR: Please make sure you have the correct access rights
STDERR: and the repository exists.
I also tried running command ssh -T git@gitlab.demo.com
but it shows "Permission denied (publickey).". Can anyone tell me why? what configuration i am missing?