PelionIoT / mbed-cloud-client-yocto-setup

Apache License 2.0
3 stars 2 forks source link

Errors while building from behind the proxy #5

Closed yemkay closed 6 years ago

yemkay commented 6 years ago

I'm trying to build the image by following the instructions in https://cloud.mbed.com/docs/current/connecting/building-the-yocto-image.html

My system is Debian.

mbed deploy --protocol git

I get this error first and after changing the URL to github repo, I get similar errors from meta-raspberrypi and poky. Am I supposed to change the URLs to github?

[mbed] ERROR: Unable to clone repository (git://git.openembedded.org/meta-openembedded/#fe5c83312de11e80b85680ef237f8acb04b4b26e)

teetak01 commented 6 years ago

Hi @yemkay, have you configured you github to use SSH keys?

https://help.github.com/articles/connecting-to-github-with-ssh/

Also you generally should leave the passphrase empty when generating the key (or configure this part https://help.github.com/articles/working-with-ssh-key-passphrases/). Otherwise mbed-cli will be asking for the permissions with every command.

The yocto build-system is currently configured to require SSH for cloning the dependencies.

Could you also check that you have latest version of mbed-cli installed? I presume you can deploy normal github repositories fine (for. ex. https://github.com/armmbed/mbed-cloud-client-example).

We have tested the build-system with Ubuntu 16.04, although Debian should not be too different.

yemkay commented 6 years ago

Sorry for the typo. I'm on Ubuntu (actually a Docker container setup).

ARM CLI version is 1.5.1

I'm able to deploy mbed-cloud-client-example. Just tried.

I'm behind proxy, but I've set http_proxy and export GIT_PROXY_COMMAND="oe-git-proxy" (referred to https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy)

After your message I added SSH key, but the error now is as below. Wondering if I should add the SSH key to OpenEmbedded.org as well?

[mbed] Adding library "meta-openembedded" from "git://git.openembedded.org/meta-openembedded" at rev #fe5c83312de1 2018/05/02 11:30:07 socat[2053] E socks: undefined status 84 fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists. error: Could not fetch origin [mbed] ERROR: Unable to clone repository (git://git.openembedded.org/meta-openembedded/#fe5c83312de11e80b85680ef237f8acb04b4b26e)


yemkay commented 6 years ago

Sorry to bother you. I'm sure its because of the behind the proxy configuration. If you're sure about the GIT URLs in poky.lib and other two lib files, then that will be fine.

ciarmcom commented 6 years ago

ARM Internal Ref: IOTCLT-2670

yemkay commented 6 years ago

Btw, do you publish the images anywhere?

I don't intend to build the image myself. Just looking for an ARM Mbed client for my Raspberry Pi 3

teetak01 commented 6 years ago

Hi @yemkay where you able to pass the Github verification test on their site?

https://help.github.com/articles/testing-your-ssh-connection/

I think the issue still seems to be that your local github is not properly authenticating with SSH. mbed-cloud-client-example lists all .lib files as https:// so those work with either mode. Yocto-recipies use git://git.something so that requires that your SSH keys are working correctly. You should not need anything special for openembedded.org.

mbed deploy will try to force SSH for git cloning if it detects "git://" format addresses in lib-files, even if its a public repository. I think this is something we can improve in the future, not requiring SSH authentication for public repositories.

Note that we recently noticed that we have some compatibility issue with the latest Raspberry 3B+, Raspberry 3B should work fine.

We do not mirror any third-party repositories.

yemkay commented 6 years ago

Let me check the Github tests. My Pi is 3 B+. What are those compatibility issues?

yemkay commented 6 years ago

SSH test was success after incorporating these.. Currently build is in progress. Thanks a lot for your guidance!!

https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy https://stackoverflow.com/a/8255371