Bug 1391422

Summary: Can not fetch github code in git protocol
Product: [Retired] Restraint Reporter: qhsong <qsong>
Component: generalAssignee: beaker-dev-list
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: asavkov, bpeck, ccui, dcallagh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-04 00:17:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description qhsong 2016-11-03 09:54:32 UTC
Description of problem:
Restraind can not fetch repo from github.com

Version-Release number of selected component (if applicable):
0.1.27

How reproducible:


Steps to Reproduce:
1.set job.xml like that
Set job.xml like that:
<job>
 <recipeSet>
  <recipe>
   <task name="test" keepchanges="yes">
    <fetch url="git://github.com/qhsong/kdump-testi-1#crash-sysrq-c/"/>
    <params>
     <param name="foo" value="bar"/>
    </params>
   </task>
  </recipe>
 </recipeSet>
</job>

2.run restraint

Actual results:
ERROR: The remote end hung up unexpectedly

Expected results:
clone repo into /mnt/tests

Additional info:
Seems github use TLS in git protocal but restraint not support.

Comment 1 qhsong 2016-11-07 02:44:41 UTC
After full research on it, It seems github not support git-upload-archive command.
So maybe we can not folk by git.

But we also can not folk by https....

Seems no ways to clone repo from github...

Comment 2 Bill Peck 2016-11-07 13:01:56 UTC
In the next version you will be able to pull from https url's which should allow the following to work:

      <task name="/tests/kdump-test-1-master/crash-altsysrq-c" role="None">
        <fetch url="https://github.com/qhsong/kdump-test-1/archive/master.tar.gz#kdump-test-1-master/crash-altsysrq-c"/>
      </task>


I'm hoping to tag and release this version Today and will update the bug then.

BTW - even with the fix in restraint the above test doesn't work for me because it's not able to generate the testinfo.desc:

** Fetching task: 47638795 [/mnt/tests/github.com/qhsong/kdump-test-1/archive/master.tar.gz/kdump-test-1-master/crash-altsysrq-c]
** Extracting kdump-test-1-master/
** Extracting kdump-test-1-master/README
** Extracting kdump-test-1-master/crash-altsysrq-c/
** Extracting kdump-test-1-master/crash-altsysrq-c/Makefile
** Extracting kdump-test-1-master/crash-altsysrq-c/Makefile.altsysrq
** Extracting kdump-test-1-master/crash-altsysrq-c/PURPOSE
** Extracting kdump-test-1-master/crash-altsysrq-c/altsysrq.c
** Extracting kdump-test-1-master/crash-altsysrq-c/runtest.sh
** Extracting kdump-test-1-master/crash-sysrq-c/
** Extracting kdump-test-1-master/crash-sysrq-c/Makefile
** Extracting kdump-test-1-master/crash-sysrq-c/runtest.sh
** Extracting kdump-test-1-master/lib/
** Extracting kdump-test-1-master/lib/crash.sh
** Extracting kdump-test-1-master/lib/env.sh
** Extracting kdump-test-1-master/lib/kdump.sh
** Preparing metadata
use_pty:FALSE make testinfo.desc
make: *** No rule to make target `testinfo.desc'.  Stop.
** Completed Task : 47638795

Comment 3 qhsong 2016-11-08 01:34:11 UTC
Yes, so I have make a restraint branch. I compile the restraint master branch and then run my code using restraint branch, it works.

Comment 4 qhsong 2016-11-08 01:37:09 UTC
Also, I wonder why fetch_git.c not use libgit2 to fetch repo. It is so geek in current ways..

Comment 6 Dan Callaghan 2017-04-04 00:17:56 UTC

*** This bug has been marked as a duplicate of bug 1328550 ***