ramnathv / slidify

Generate reproducible html5 slides from R markdown
http://www.slidify.org
844 stars 339 forks source link

Rstudio github 404 #322

Closed bw4sz closed 10 years ago

bw4sz commented 10 years ago

Hi all,

I'm trying to get my first slidify test to work. I've never had to connect the SSH through Rstudio before, but i went into gitbash, made a ssh key, and successfully test the connection following. https://help.github.com/articles/generating-ssh-keys

Is there a way to test outside of slidify that my ssh github connection is working inside of Rstudio? I normally use the commit gui in the top right corner when using a version control project: http://www.rstudio.com/ide/docs/version_control/overview

I've also tried going into Rstudio and making an SSH key, and activating it on the github website.

I made a blank repo with a readme called test in my account, but every time i "publish" with slidify nothing ends up in my github repo and i get the 404 github page doesn't exist when automatically redicreted to the html file (since nothing is in the github repo).

I'm using the defaults as shown on the slidify website:

library(slidify) library(slidifyLibraries) author("testdeck") slidify("index.Rmd") publish("bw4sz","test")

I figure this is more of an Rstudio SSH github on windows issue? Have people gotten this combination to work with slidify?

Thanks Ben

ramnathv commented 10 years ago

Yes. People have gotten this working with RStudio.

Can you try using the Github Window's Client to publish to gh-pages?

bw4sz commented 10 years ago

Can you be slightly more specific? At what point should i publish, ie, not use your publish command? And just try to upload to git (either in Rstudio, or as through the gitclient)?

Thanks for your time, seems like a nice tool - just trying to get all the pieces together.

ramnathv commented 10 years ago

Yes. Just replace the publish step and use your git/github client to push your repository.

Once you are able to get that working, we will figure out what the problem is with command-line publishing.

bw4sz commented 10 years ago

Sorry, no luck. Here's what i've tried out, please let me know if i need to be more detailed about Rstudio env.

  1. Inside an already created Rstudio project

Library(slidify) Library(slidifyLibraries) author("Test") slidify("index.Rmd")

At this point, i try to commit and push from within Rstudio up to github, but i cannot stage any items, simply will not select them. This is very odd since its never had any problem with .Rmd before, i use them frequently.

  1. Inside a blank repo, i get the same issue.

I've found an article discussing this issue generally in github, is there anything that slidify "holds" on to that would prevent windows from indexing?

http://support.rstudio.org/help/discussions/problems/4829-cant-check-the-checkboxes-to-stage-files-in-git-pane

My only other comment, is when inside a already created project, i can't actually close R after i use the slidify command, it just stalls and it needs to be shut down from the task manager, seems indicative of some larger issue. This does not happen when i just run a test outside of a Rstudio project. Though it still wouldn't explain why i can't publish to a github repo from outside an Rstudio project.

Best,

Ben

ramnathv commented 10 years ago

Here is the problem. When you create an RStudio Project, I am assuming you are also initializing a git repository. Now author creates a directory named Test in your project and tries to initialize it as a git repo. Now a git repo cannot contain another git repo, which is probably causing things to lock up.

So here is what I would suggest. DONT create an RStudio Project. Use author to initialize a slide deck and then run slidify to create your deck. Use the Windows Github Client to push to Github.

bw4sz commented 10 years ago

Brief add on, if i go ahead and try to say publish("bw4sz","test") which was the test github repo, i don't receive any errors, and the github repo is blank, as is the website (as reported earlier), but interestingly, i can now close Rstudio without issue. Is it releasing something?

bw4sz commented 10 years ago

Sounds good, will report back shortly, thank you.

ramnathv commented 10 years ago

The issue of locking up seems to be similar to what is seen here.

bw4sz commented 10 years ago

Success, i was correctly able to use the windows github client to push to the repo test. I can see that adding a branch of 'gh-pages' can be used to manually push to a github website, is this the next step?

Thanks again.

bw4sz commented 10 years ago

Sorry, i hope this will be the last issue, but i noticed something that may help diagnoss the root problem. When i try author:

author("slidifyDemo") Creating slide directory at slidifyDemo... Copying files to slidifyDemo... Finished creating slide directory... Switching to slide directory... Opening slide deck...

This is missing the lines about opening a git repo that i see when looking at your youtube videos. Is there some other connection missing? Obviously, using the publish function is a real asset, and i'l like to try to make it work.

Ben

ramnathv commented 10 years ago

Okay. For some reason, slidify is unable to detect that you have git installed. Can you type Sys.which('git') in your R console and tell me what it returns? If slidify detects git it will automatically set up a gh-pages only branch which when pushed to github will work as a website.

bw4sz commented 10 years ago

Okay, making progress. You were right, Rstudio didn't not see git, i have handled that by exporting the global path so now it correctly returns

Sys.which('git') git "C:\PROGRA~2\Git\bin\git.exe"

Now when i call slidify it sees a git repo, but gives a couple ominous flags

author("test3") Creating slide directory at test3... Copying files to test3... Finished creating slide directory... Switching to slide directory... Initializing Git Repo Initialized empty Git repository in C:/Users/Ben/Documents/test3/.git/ error: pathspec 'Commit'' did not match any file(s) known to git. Checking out gh-pages branch... Switched to a new branch 'gh-pages' Adding .nojekyll to repo Opening slide deck... Warning message: running command 'git commit --allow-empty -m 'Initial Commit'' had status 1

if i run through with the rest of the script and try to publish, it hangs on the line:

*\ Please tell me who you are.

Run

git config --global user.email "you@example.com" git config --global user.name "Your Name"

to set your account's default identity. Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'Ben@lappy.(none)')

This is odd since if i open gitbash, and call

git config --global -list

it correctly returns user.email = benweinstein2010@gmail.com and user.name = bw4sz.

i only have one copy of git installed, as evidenced by

list.files(

I'm not sure why slidify and gitbash would disagree.

Thank you.

Ben

ramnathv commented 10 years ago

Can you type system('git config --global -list') in your R console to check if you get the same response as in gitbash?

The other error you see might be happening because of the use of single quotes vs. double quotes in slidify:::init_repo. We will solve this issue one piece at a time.

bw4sz commented 10 years ago

Sorry for the slower response, teaching during the week.

system('git config --global -list') error: did you mean --list (with two dashes ?) Warning message: running command 'git config --global -list' had status 129

and

On Sun, Dec 8, 2013 at 9:41 PM, Ramnath Vaidyanathan < notifications@github.com> wrote:

Can you type system('git config --global -list') in your R console to check if you get the same response as in gitbash?

The other error you see might be happening because of the use of single quotes vs. double quotes in slidify:::init_repo. We will solve this issue one piece at a time.

— Reply to this email directly or view it on GitHubhttps://github.com/ramnathv/slidify/issues/322#issuecomment-30102246 .

Ben Weinstein PhD Candidate Ecology and Evolution Stony Brook University

http://benweinstein.weebly.com/

bw4sz commented 10 years ago

sorry! I hit send to soon.

trying again.

system('git config --global -list') error: did you mean --list (with two dashes ?) Warning message: running command 'git config --global -list' had status 129

system('git config --global --list') fatal: unable to read config file 'C:/Users/Jorge/Documents/.gitconfig': No such file or directory Warning message: running command 'git config --global --list' had status 128

i've posted on the Rstudio forum to try to get a feeling for what might be behind this difference.

On Mon, Dec 9, 2013 at 5:21 PM, Ben Weinstein benweinstein2010@gmail.comwrote:

Sorry for the slower response, teaching during the week.

system('git config --global -list') error: did you mean --list (with two dashes ?) Warning message: running command 'git config --global -list' had status 129

and

On Sun, Dec 8, 2013 at 9:41 PM, Ramnath Vaidyanathan < notifications@github.com> wrote:

Can you type system('git config --global -list') in your R console to check if you get the same response as in gitbash?

The other error you see might be happening because of the use of single quotes vs. double quotes in slidify:::init_repo. We will solve this issue one piece at a time.

— Reply to this email directly or view it on GitHubhttps://github.com/ramnathv/slidify/issues/322#issuecomment-30102246 .

Ben Weinstein PhD Candidate Ecology and Evolution Stony Brook University

http://benweinstein.weebly.com/

Ben Weinstein PhD Candidate Ecology and Evolution Stony Brook University

http://benweinstein.weebly.com/

sahirbhatnagar commented 10 years ago

I was getting a similar error message, using RStudio on Linux, after having followed the video tutorial:

publish('sahirbhatnagar', 'testing') Publishing deck to testing/sahirbhatnagar [gh-pages ff07a12] publishing deck 3 files changed, 114 insertions(+) ERROR: Repository not found. fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists. You can now view your slide deck at http://testing.github.com/sahirbhatnagar

This problem was resolved simply by specifying the user and repo inputs, as well as putting their values in double quotation marks:

publish(user="sahirbhatnagar", repo="testing") Publishing deck to sahirbhatnagar/testing

On branch gh-pages

nothing to commit, working directory clean To git@github.com:sahirbhatnagar/testing d49e0e3..ff07a12 gh-pages -> gh-pages You can now view your slide deck at http://sahirbhatnagar.github.com/testing