Mbed Repositories (not Github) and Mbed Keil Studio Cloud troubles

Hi there,

I’m having a lot of difficulties working with Mbed repositories hosted under profile/code while using Keil Studio Cloud. With Github repositories, everything works perfectly fine. Importing projects from both Github and my Mbed repositories is flawless. It is when I want to publish to an empty repository, or commit my changes to a repository hosted on Mbed is where problems starts.

I get all kinds of weird errors, such as (“test” is the mbed repository in this case):

Request push failed with message: “hg push --config auth.mbed.prefix=* --config auth.mbed.username=x-application-token-auth --config auth.mbed.password=1XXXXXXXXXXXXXXXXXXXXX3” failed: 112,117,115,104,105,110,103,32,116,111,32,104,116,116,112,58,47,47,111,115,46,109,98,101,100,46,99,111,109,47,117,115,101,114,115,47,100,97,110,105,97,108,49,57,49,48,48,47,99,111,100,101,47,116,101,115,116,47,10 115,101,97,114,99,104,105,110,103,32,102,111,114,32,99,104,97,110,103,101,115,10 real URL is test - This is a test of mbed repository. | Mbed ,abort: push creates new remote head 2003b3550d78! ,(merge or see ‘hg help push’ for details about pushing new heads)

I’ve also tested if my issues presist using Mbed Studio IDE. But everything works fine on IDE.

I was wondering if there is something I’m messing or doing wrong. I’ve searched online and so far It seems that I’m only one encountering such issues?

Hello,

I tried that and seems to be working. Error like your one occurs only when I tried Push / Push to to an URL repo, but without any commited change.
I do not tested it so thoroughly with MbedStudio but I also saw that error with it.

BR, Jan

Hi,

Is there any solution for this? I can always switch to a Github repositories and move forward. But what about other thousands of projects hosted on Mbed repositories? So if I want to contribute to an old project here on Mbed, I need to fork it to Github, just so I can contribute my commits?

best Regards
Danial

Hello Daniel,

I know my English is not well but I not agree with you.
The error really occures in my case, but because I tried pushing project without any Commit of project.
So you need to do a commint before you can Push to your repository and also you can not Push same Commint twice.

In the history log of my repository below are visilble two commints what was made from KeilStudio.
UDP_Echo - UDP echo with thread | Mbed

BR, Jan

Hi,

No worries Johnny! I understand perfectly fine. Thank you for your replies.

In the case of having commits or not, I do have commits! I’ve made commits on Keil Studio and I’m trying to push these commits to the Mbed repository that I just made for my project. Let me picture for you a scenario that might reproduce my problem:

  1. I make a new empty project (successful)

  2. I make my changes. I stage and commit my changes using built in Git tool on Keil. (successful)

  3. I go to my Mbed/Code page, create an empty repository for my new project. (successful)

  4. I come back to Keil, then to “Source Control” tap found in, under options, I click “Publish Project” and therefor I publish my project. (successful)

  5. I do more changes to my code, stage and commit etc. (successful)

  6. I now try to push/pull: ERROR … (FAIL)

There are multiple of different weird errors I encountered, but the most frequent one is the one I posted as an example in my original post. When I do the same steps on Mbed IDE, everything works quite fine! It is only Keil Studio Online causing problem.

Best Regards,
Danial

Hi there again,

I’ve done more testing. For whatever reason, after creating a new project and tracking all files and then setting up remote repository on Keil (“Publish Project”), older commits as well as newer ones will sometimes disappear, as if such changes or commits ever existed! I can verify this using the “History” tab on Keil Cloud.

This is scary! As of now, I still don’t know why my commits disappeared. I undrestand that there are alot of variables in play when it comes to these kind of troubleshootings.

So I make sure my test environments are as clean as possible (to the best of my knowledge ofcourse). I’ve disabled all browser plugins when working with Mbed Keil Studio cloud and other similar steps to minimize any outside interference with Keil (Though I highly doubt these cause any major trouble.).

Perhaps this is a synchronization. But I’ve never experience such problems when using Github platform for remote repositories.

Danial

Hi there again,

good news!

I believe I found a solution to my problem. When I usually create a new project, I leave “Initialize this project as a Git repository” enabled, as it is enabled by default. Until now, this didn’t cause problem and worked flawlessly with Github remote repositories.

But for whatever odd reason, if this “initialize this project as a Git repository” option is enabled and one is to “Publish Project” from 3 dot settings on Version Control tab, this will cause all kinds of problems as far is having your commits disappear unexpectedly.

I solved my problem myself, but nevertheless thank you Johnny for providing your insight on this subject.

So in Summery,
For anyone who is trying to use Mbed remote repositories and is having similar issues, make sure that when you created a new project, option “initialize this project as a Git repository” is disabled. This way, the only option that will be visible on Version Control tab in Keil Studio Cloud is “Publish Project”, just like in Mbed IDE.

So it should look like something like this:

And the “Initialize this project as a Git repository” option I mentioned is found here:

image

This somehow fixes everything. I still cannot explain these odd unexpected behavior by Mbed KSC. Hopefully this is fixed in future updates. And hopefully my solution works for you as well.

Best Regards,

Danial Mousavi

1 Like