clearml-agent ignore force_git_ssh_protocol: true
u-tain opened this issue · comments
I'd like to use the ssh protocol when cloning a repository while running a task. To do this, I set the force_git_ssh_protocol: true in clearml.conf, but when I start the task, it both uses user/pass and fails.
cloning: git@some_link.git
Using user/pass credentials - replacing ssh url 'git@some_link.git' with https url 'https://some_link.git'
remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. See https://link.ru/help/topics/git/troubleshooting_git#error-on-git-fetch-http-basic-access-denied
fatal: Authentication failed for 'https://user:pass@some_link.git/'
Repository cloning failed: Command '['clone', 'https://user@some_link.git', '/home/miner/.clearml/vcs-cache/pipelines.git.5b4be030e56e0cbbaeb44f4252de11cd/pipelines.git', '--quiet', '--recursive']' returned non-zero exit status 128.
clearml_agent: ERROR: Failed cloning repository.
1) Make sure you pushed the requested commit:
(repository='git@some_link.git', branch='main', commit_id='b729020712990d41d1b2f12475f2742fea88971b', tag='', docker_cmd=None, entry_point='dataset_creation.py', working_dir='torch_pipeline')
2) Check if remote-worker has valid credentials [see worker configuration file]
My clearml.conf
force_git_ssh_protocol: true
python_binary: "/usr/bin/python3.8"
docker_internal_mounts: {
venv_build: "/data/.clearml/venvs-builds"
}
extra_docker_shell_script: ["RUN apt update && apt install -y libsm6 libxext6 ffmpeg libfontconfig1 libxrender1 libgl1-mesa-glx",
"apt-get update && apt-get install -y python3-opencv && pip install opencv-python"]
ignore_requested_python_version: true
venvs_cache: {path: "/data/.clearml/venvs-builds"}
venvs_dir: "/data/.clearml/venvs-builds"
default_docker: { image: "predictor_service" }
package_manager: {
type: "pip"
pip_version: [">22.1"]}
}
How can I resolve this problem?
Environment
- clearml-agent == 1.6.0
- Python Version == 3.8
- OS Linux
Update: When I make a draft task with
task = Task.init() task.execute_remotely()
in EXECUTION I see an ssh link to git. I tried changing it to https url and after that the repository cloning error disappeared. The problem is that I changed the link manually through the web interface. Can I specify the desired type of link during task initialization or immediately after?
Hi @u-tain , it seems the clearml.conf you included is truncated - just wanted to make sure how the section in which force_git_shh_protocol is named...
Can you also verify this reproduces with the latest agent version? (also with the latest agent RC)