Personally I’ve found this (sort-of hacky) approach to work, by passing your git credentials as environment variables to the agent’s docker and cloning the repo in the code. You’ll have to make sure you have the right packages installed though.if 'GIT_USER' in os.environ: git_name, git_pass = os.environ['GIT_USER'], os.environ['GIT_PASS'] call(f'git clone https://{git_name}:{git_pass}@gitlab.com/myuser/myrepo', shell=True) global myrepo from myrepo import func elif local_repo_path and os.path.isdir(local_repo_path): # Optionally supply a path to the repo when ran locally sys.path.append(local_repo_path) global myrepo from myrepo import func
An alternative is using a pipeline where you can have each step use a different repo, but then the code will have to be separated
Answered
Hi, Is There A Way To Clone An Experiment That Uses Two Distinct Repositories?
Hi, is there a way to clone an experiment that uses two distinct repositories?
988 Views
2
Answers
one year ago
one year ago
Tags