Skip to content

mbed add mangles ssh URLs and shows confusing messages #242

@bremoran

Description

@bremoran

The normal git way of handling ssh urls is not followed by mbed add:

annirak:~/workspace $ git clone git@github.com:ARMmbed/mbedtls.git
Cloning into 'mbedtls'...
Warning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts.
remote: Counting objects: 41705, done.
remote: Compressing objects: 100% (906/906), done.
remote: Total 41705 (delta 637), reused 0 (delta 0), pack-reused 40799
Receiving objects: 100% (41705/41705), 21.54 MiB | 4.94 MiB/s, done.
Resolving deltas: 100% (30958/30958), done.
Checking connectivity... done.
annirak:~/workspace $ cd mbedtls/
annirak:~/workspace/mbedtls (development) $ git remote -v show
origin  git@github.com:ARMmbed/mbedtls.git (fetch)
origin  git@github.com:ARMmbed/mbedtls.git (push)

With mbed add:

annirak:~/workspace/test (master) $ mbed add --protocol ssh git@github.com:ARMmbed/mbedtls.git
[mbed] Adding library "mbedtls" from "https://github.com/ARMmbed/mbedtls/" at latest revision in the current branch
Warning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts.
[mbed] Updating reference "mbedtls" -> "https://github.com/ARMmbed/mbedtls/#e012aa3ae2471f6e742a09ca44aa609acffa7e52"
The following paths are ignored by one of your .gitignore files:
mbedtls.lib
Use -f if you really want to add them.
annirak:~/workspace/test (master) $ cd mbedtls/
annirak:~/workspace/test/mbedtls (development) $ git remote -v show
origin  ssh://github.com/ARMmbed/mbedtls.git (fetch)
origin  ssh://github.com/ARMmbed/mbedtls.git (push)

Note that mbed add incorrectly reports https://github.com/ARMmbed/mbedtls/ and saves ssh://github.com/ARMmbed/mbedtls.git as the remote. Both of these should be the same as the original: git@github.com:ARMmbed/mbedtls.git

mbed update similarly reports https URLs when updating an ssh repo.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions