How to build a snap using "source-type: git"?

Asked by Sylvain Pineau

Hello,

I'm trying to build a snap using launchpad. My special case is that in my snapcraft.yaml I'm using "source-type: git" to get code from git.launchpad.net
it fails with a timeout:

fatal: unable to connect to git.launchpad.net:
git.launchpad.net[0: 162.213.33.96]: errno=Connection timed out
git.launchpad.net[1: 162.213.33.95]: errno=Connection timed out

I guess it's because of the way ppa works
My question is how can we build such snaps using lp?

Thanks

Full log: https://launchpad.net/~checkbox-dev/+snap/checkbox-snappy/+build/252

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Sylvain Pineau
Solved:
Last query:
Last reply:
Revision history for this message
Colin Watson (cjwatson) said :
#1

Use https:// instead of git:// in your snap and it should be fine.

Revision history for this message
Sylvain Pineau (sylvain-pineau) said :
#2

Humm, no same result:

fatal: unable to access 'https://git.launchpad.net/plainbox-provider-snappy/': Resolving timed out after 443739 milliseconds

Revision history for this message
Colin Watson (cjwatson) said :
#3

I've asked IS to look into what appears to be a DNS resolution issue, and will let you know when it's sorted out.

You're also likely to run into https://bugs.launchpad.net/turnip/+bug/1547141, which I noticed when investigating this. (Going back to git:// would work around that, though.)

Revision history for this message
Colin Watson (cjwatson) said :
#4

Thanks to IS making a firewall change, this should work now, at least in the git:// case. We're still working on being able to do "git clone --depth 1" over https://, but using git:// is a reasonable workaround for now.

Revision history for this message
Sylvain Pineau (sylvain-pineau) said :
#5

Indeed, it works flawlessly. Thanks a lot.