[Rd] R-Forge > GitHub?

Spencer Graves @pencer@gr@ve@ @end|ng |rom prod@y@e@com
Sun Jun 30 01:06:14 CEST 2019


Hi, Henrik et al.:


       What's your favorite documentation on how to make two GitHub 
projects from one containing two packages?


       Currently, "github.com/sbgraves237/Ecdat" consists primarily of a 
directory "pkg" with subdirectories "Ecdat" and "Ecfun" containing the 
two packages.  I need to know how to do the following:


             1.  Extract "github.com/sbgraves237/Ecdat/pkg/Ecfun" to 
create  "github.com/sbgraves237/Ecfun".


              2.  Elevate "github.com/sbgraves237/Ecdat/pkg/Ecdat" to 
"github.com/sbgraves237/Ecdat", discarding the other files in the 
original "github.com/sbgraves237/Ecdat/".


       This sounds like it could be accomplished relatively easily by 
someone with sufficient understanding of "git" and GitHub.  I could use 
suggestions on how to do this -- or at least on how to find 
documentation on how to do this.


       Thanks,
       Spencer


On 2019-06-29 14:09, Henrik Bengtsson wrote:
> On Sat, Jun 29, 2019 at 9:43 AM Spencer Graves
> <spencer.graves using prodsyse.com> wrote:
>> Hi, Ott et al.:
>>
>>
>>         What's the best way to get "Travis CI" to build and test the two
>> packages, Ecdat and Ecfun, that have long been combined in the Ecdat
>> project?
>>
>>
>>         Following Ott's advice and studying studying Wickham's "R
>> Packages" (http://r-pkgs.had.co.nz/), I was able to configure RStudio so
>> it would sync using git with "GitHub.com/sbgraves237/Ecdat".  However,
>> when I tried to configure "Travis CI", it said, "No DESCRIPTION file
>> found, user must supply their own install and script steps".
>>
>>
>>         Earlier in this thread, I think someone suggested I make the
>> Ecdat and Ecfun packages separate projects on GitHub (though I can't
>> find that suggestion now).  This would not be an issue if it were all
>> local without version control.  With RStudio managing my interface with
>> GitHub, it now seems quite tricky.
> I'm 99.999% confident that your life will be much much easier if you
> keep one R package per repository.  If you don't, you'll probably be
> very lonely when it comes to tools etc.  There are built-in 'git'
> commands, but also git utility tools, for extracting a subset of
> folders/files from git repository into new git repositories.  You'll
> still preserve the commit history.  I would deal with this in the
> terminal, using the 'git' client and possible some extraction tool.
>
> Also, while you spend time on this, have a look at the commit
> authorship that I mentioned previously.  It's nice to have that in
> place later.
>
> After you got the above in place, then .travis.yml and appveyor.yml is
> pretty straightforward (might even be a copy'n'paste).
>
> Finally, I saw you put your credentials in the URL when you cloned.  I
> don't think that's safe, your GitHub credentials will be stored in the
> ./.git/config file.  Instead, just clone with:
>
> git clone https://github.com/sbgraves237/Ecdat.git
>
> You can then configure git to cache your HTTPS credentials for a
> certain time, e.g. 120 minutes, so you don't have to enter them each
> time you pull/push.  See https://git-scm.com/docs/git-credential-cache
> for details.  That's what I tell new-comers to Git(Hub|Lab|...) to
> use.  Personally, I add my public SSH key to GitHub and then clone
> with the ssh protocol:
>
> git clone git using github.com:sbgraves237/Ecdat.git
>
> That way my I never have to worry entering my credentials.
>
> /Henrik
>
>>
>>         Suggestions?
>>         Thanks again to all who have offered suggestions so far.  This
>> migration from R-Forge to GitHub seems complete except for the automatic
>> tests provided via "Travis CI".
>>
>>
>>         Spencer
>>
>>
>> On 2019-06-28 22:25, Ott Toomet wrote:
>>> Apparently your username/password are wrong.  Can you clone/push from
>>> other repos?
>>>
>>> You do not need authorization when cloning a public repo, so even
>>> incorrect credentials may work (haven't tested this though).  But for
>>> push you have to have that in order.
>>>
>>> I suggest you create ssh keys, upload those to GH, and use ssh
>>> authorization instead of https.
>>>
>>> Cheers,
>>> Ott
>>>
>>> On Fri, Jun 28, 2019 at 8:18 PM Spencer Graves
>>> <spencer.graves using prodsyse.com <mailto:spencer.graves using prodsyse.com>> wrote:
>>>
>>>      Thanks to Duncan, Henrik and Henrik, Brian, and Gábor:
>>>
>>>
>>>             I created a local copy of the new GitHub version using the
>>>      following:
>>>
>>>      git clone
>>>      https://sbgraves237:mypassword@github.com/sbgraves237/Ecdat.git
>>>
>>>
>>>
>>>             That worked in the sense that I got a local copy. However,
>>>      after
>>>      I rolled the version number and did "git commit" on the DESCRIPTION
>>>      files, my "git push" command generated the following:
>>>
>>>
>>>      remote: Invalid username or password.
>>>      fatal: Authentication failed for
>>>      'https://sbgraves237:mypassword@github.com/sbgraves237/Ecdat.git/'
>>>
>>>
>>>             What am I missing?  [Note:  I used my actual GitHub
>>>      password in
>>>      place of "mypassword" here, and this "Authentication failed" message
>>>      reported the GitHub password I used here.]
>>>
>>>
>>>             Thanks,
>>>             Spencer
>>>
>>>
>>>      p.s.  I'm doing this under macOS Mojave 10.14.5.  Also,  I added
>>>      ".onAttach" functions to the R-Forge versions as Brian G. Peterson
>>>      suggested.  That seemed to work fine.
>>>
>>>
>>>      On 2019-06-28 07:13, Duncan Murdoch wrote:
>>>      > On 28/06/2019 6:26 a.m., Gábor Csárdi wrote:
>>>      >
>>>      >> Instead, you can do as Duncan suggested, and put a README in your
>>>      >> R-Forge
>>>      >> repository, that points to *your* GitHub repositor(y/ies). Then the
>>>      >> https://github.com/rforge/ecdat read only mirror will pick this up
>>>      >> and will
>>>      >> point there as well.
>>>      >
>>>      > Just for the record:  that was Henrik Singmann's suggestion, I just
>>>      > agreed with it.
>>>      >
>>>      > Duncan Murdoch
>>>      >
>>>
>>>
>>>              [[alternative HTML version deleted]]
>>>
>>>      ______________________________________________
>>>      R-devel using r-project.org <mailto:R-devel using r-project.org> mailing list
>>>      https://stat.ethz.ch/mailman/listinfo/r-devel
>>>
>>
>>          [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-devel using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list