Discussion:
[yocto] Question about access local stash/bitbucket server via yocto
Olsson Rikard (RBSN/ESW1)
9 years ago
Permalink
Dear Yocto members,

My first post so here we go....
1) I am new to yocto and so is the company I work for....
2) My companys firewall/intranet blocks git protocol so only http works...

Anyhow, in the company there is a local stash/bitbucket sever which run on XXXX port number where I have some repositories and I am able to clone them with:
git clone http://<USER>@<server>:<PORT>/XXX/~YYY/ZZZ.git<http://%3cUSER%3e@%3cserver%3e:%3cPORT%3e/XXX/~YYY/ZZZ.git> ==> This works fine from command line, note the "~"

However, now I want to do the clone from a yocto/bitbake file I created as follows:
LIC_FILES_CHKSUM = "file://LICENSE;md5=XXXXXXXXXXXXXXXXXXXXXXXXX"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
SRCREV = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
SRC_URI = "http:/<USER>@<server>:<PORT>/XXX/~YYY/ZZZ.git"
However this fails with Username/Password Authentication Failed which I find strange since I have no problem with git clone .....

Now I have two questions:

1) Is it possible to add my USER and PASSWORD in the bitbake/yocto (*.bb file) file to work around the Username/Password Authentication Failed problem.

2) I also have a question if there are any limitation in the path I use, for example:

a. Is it OK to have <PORT> number as part of path, I haven't seen that in any other files related to yocto/bitbake? And if not how do I specify the PORT number?

b. Or maybe the "~" will cause problem , I haven't seen this in any path names related to yocto/bitbake?

Any advice I appreciated.

Mit freundlichen Grüßen / Best regards

Rikard Olsson

Engineering Software, Lund, Sweden (RBSN/ESW)
Tel. +46(46)270-6843 | ***@se.bosch.com<mailto:***@se.bosch.com>
Christian Ege
9 years ago
Permalink
Hi Rikard,
My first post so here we go….
Welcome to the OpenEmbedded world.
1) I am new to yocto and so is the company I work for….
2) My companys firewall/intranet blocks git protocol so only http works…
welcome to my world
...
You have multiple options here:

- Switch to SSH for stash access
- Add a yocto user to stash and add those credentials to a the yocto
build users .netrc (http://www.mavetju.org/unix/netrc.php)
- Check poky/bitbake/lib/bb/fetch2/git.py what options are possible
for the git fetcher

You can wrap your stash URL in a Variable and set it in a global
location for example your conf/local.conf

MYFANCY_URI ??= "git://git.xxxx.com/scm/proj"
MYFANCY_URI_PROTOCOL ??= "https"
Any advice I appreciated.
Mit freundlichen Grüßen / Best regards
Regards,
Christian
--
r***@selinc.com
9 years ago
Permalink
Date: 03/02/2016 06:31 AM
Subject: [yocto] Question about access local stash/bitbucket server via
yocto
...
Using SSH is probably your best bet. You'll need to upload your public
key to Stash first (it's in your account settings). The SRC_URI syntax is
a bit awkward in my opinion, but it looks like this:
SRC_URI = "git://<user>@<server>:<port>/XXX/~YYY/ZZZ.git;protocol=ssh"

Note that the user is not your Stash username, it's the user that Stash
uses for SSH. It is probably "git" or something similar. The port number
and tilde are not a problem.
...
--
Robert Joslyn
Software Engineer, R&D - Automation
Schweitzer Engineering Laboratories
509-332-1890 ext. 3214
--
Randle, William C
9 years ago
Permalink
...
You may also need to cache your passphrase using ssh-agent/ssh-add, as
bitbake it not setup to prompt you for it.
...
--

Loading...