Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ssh URLs in cm pull repo #1253

Closed
arjunsuresh opened this issue May 23, 2024 · 4 comments
Closed

Support ssh URLs in cm pull repo #1253

arjunsuresh opened this issue May 23, 2024 · 4 comments
Assignees

Comments

@arjunsuresh
Copy link
Contributor

Currently only 'https' is supported in CM pull repo and this causes problems to users using ssh access like reported here

@gfursin
Copy link
Contributor

gfursin commented May 24, 2024

Not sure what you mean. I believe we can pass --url to cm pull repo to specify any protocol? I think this should work:

cm pull repo --url=git+ssh://github.com/mlcommons/cm4abtf --checkout=dev

@arjunsuresh
Copy link
Contributor Author

If we are following the github URLs, we get the SSH URL in this form: [email protected]:mlcommons/ck.git which currently does not work with cm pull repo

I think we should support that and when users use "mlcommons@ck" there should be a parameter like --protocol=ssh or simply --ssh to automatically use SSH.

Also checkout is currently broken (won't pull changes on a retry) similar to --branch issue reported here

arjun@arjun-spr:~/CM/repos/mlcommons@cm4abtf$ cm pull repo --url=git+ssh://github.com/mlcommons/cm4abtf --checkout=dev
=======================================================
Alias:    mlcommons@cm4abtf
URL:      git+ssh://github.com/mlcommons/cm4abtf
Checkout: dev

Local path: /home/arjun/CM/repos/mlcommons@cm4abtf

git pull

There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> dev


git checkout dev

Already on 'dev'

CM alias for this repository: mlcommons@cm4abtf

@gfursin
Copy link
Contributor

gfursin commented May 24, 2024

Ok. I see. Sure, it will be useful to add such support.

@anandhu-eng
Copy link
Contributor

Tested PR #1346, its working fine. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants