My config.toml file
concurrent = 1
check_interval = 0
shutdown_timeout = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "fargate testing"
url = "https://code.xx.com/"
id = 2715
token = "xxxxxxxxxxxxxxx"
token_obtained_at = 2024-07-18T17:34:41Z
token_expires_at = 0001-01-01T00:00:00Z
executor = "custom"
builds_dir = "/opt/gitlab-runner/builds"
cache_dir = "/opt/gitlab-runner/cache"
[runners.custom_build_dir]
[runners.cache]
Type = "s3"
MaxUploadedArchiveSize = 0
[runners.cache.s3]
ServerAddress = "s3.amazonaws.com"
BucketName = "aie-gitlab-runner-cache"
BucketLocation = "us-east-1"
[runners.custom]
config_exec = "/opt/gitlab-runner/fargate"
config_args = ["--config", "/etc/gitlab-runner/fargate.toml", "custom", "config"]
prepare_exec = "/opt/gitlab-runner/fargate"
prepare_args = ["--config", "/etc/gitlab-runner/fargate.toml", "custom", "prepare"]
run_exec = "/opt/gitlab-runner/fargate"
run_args = ["--config", "/etc/gitlab-runner/fargate.toml", "custom", "run"]
cleanup_exec = "/opt/gitlab-runner/fargate"
cleanup_args = ["--config", "/etc/gitlab-runner/fargate.toml", "custom", "cleanup"]
This is my fargate.toml file
LogLevel = "info"
LogFormat = "text"
[Fargate]
Cluster = "fargate-cluster"
Region = "us-east-1"
Subnet = "subnet-xxxxxxx"
SecurityGroup = "sg-xxxxx"
TaskDefinition = "fargate-task"
EnablePublicIP = false
[TaskMetadata]
Directory = "/opt/gitlab-runner/metadata"
[SSH]
Username = "ubuntu"
Port = 22
when I tried to run the pipeline i am getting this error. I am not sure why the handshake is failing PLease help me.
INFO[2024-07-18T17:43:36Z] [Execute] Will connect to server and execute the specified shell script PID=23125 command=run_exec stage=prepare_script
INFO[2024-07-18T17:43:36Z] will not retry operation PID=23125
command=run_exec error="connecting to server "172.28.222.139:22" as user "ubuntu":
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain" stage=prepare_script
ERRO[2024-07-18T17:43:36Z] Application execution failed PID=23125
error="executing the script on the remote host: executing script on container with IP "172.28.222.145":
connecting to server: connecting to server "172.28.222.145:22" as user "ubuntu": ssh:
handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain"
ERROR: Job failed (system failure): prepare environment: exit status 2. Check [https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading][1] for more information
The solution mentioned in the below official document is not helping