iterative / iterative/cml

Error: URL Parsing Failed {"subject_url":"git@github.com:...\n"}

Open
#1,434 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.2k
Forks
345
PR merge metrics
No merged PRs in 30d

Description

I've solved this already.
I'm posting as a solution and also a problem, as its failure is not *that* clear

# Problem
When I run
```shell
cml runner launch \
--token="..." \
--labels="cml-gpu" \
--idle-timeout="1h" --driver=github
```

I get

```
error: URL parsing failed. {"subject_url":"git@github.com:FR-DC/FRDC-ML.git\n"}
```

## Solution

The problem is that CML doesn't recognize the SSH URLs (starts with `git@`), instead only works with HTTPS URLs (starts with `https`).

To fix this, edit `.git/config`

For example:
```
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git@github.com:FR-DC/FRDC-ML.git
```

Change `url = ...` to the HTTPS variant

```
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/FR-DC/FRDC-ML.git
```

## Replicating
This usually happens when you clone using SSH. It happened to me as I configured the `gh-cli` to prefer SSH, and can be a silent failure for many

```
gh repo clone OWNER/REPO
```

```
git clone git@github.com:OWNER/REPO.git
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.