Open lrdegeest opened 3 years ago
It's not immediately clear to me what the problem is. Below are some ideas to gain more information for troubleshooting.
Please run the following lines in the R console and return the full output:
git2r::libgit2_features()
library(workflowr)
wflow_git_push()
Run the following in the terminal and return the full output:
git branch
git push -u origin master
Also note this may have to do with the very recent change by GitHub to remove password authentication when pushing from the command-line. While this has security benefits, it makes it the initial Git setup that much more difficult (and thus harder for tools like workflowr to assist you in the process).
Here are some brief instructions from GitHub. Essentially instead of entering your password when prompted, you copy-paste a Personal Access Token. For that reason you are better off using command line Git, since it will save this for future use. wflow_git_push()
is only needed if you have trouble installing Git, and you already have it installed.
Part 1.
> git2r::libgit2_features()
$threads
[1] FALSE
$https
[1] TRUE
$ssh
[1] TRUE
The second part (library(workflowr); wflow_git_push()
) ask for my GitHub username (at the command line) and then my password (in a dialogue box).
Part 2.
$ git branch
fatal: not a git repository (or any of the parent directories): .git
$ git push -u origin master
fatal: not a git repository (or any of the parent directories): .git
$https
[1] TRUE
This is a good sign. git2r/libgit2 was compiled correctly on your machine to support the HTTPS protocol.
and then my password (in a dialogue box).
What did you enter in the dialogue box? Did you enter your GitHub password or did you copy-paste a personal access token with repo access?
fatal: not a git repository (or any of the parent directories): .git
Git commands only work when run inside the Git repository. You'll need to navigate to the Git repository using cd
. If you're not sure where the Git repository is located, you can run getwd()
in R and copy paste the working directory. Alternatively if you are using RStudio, you can open Terminal within RStudio, which should automatically be in the project directory.
@lrdegeest Any update on this? If you're having issues with GitHub authentication, I suspect other users will have similar issues, so I'd like to determine the source of the problem.
@jdblischak Sorry for the delay, missed your message. So, I did run all the git commands inside the home directory, and that was when I got those errors. Using the personal access token seemed to make things work. My guess is that others will run into the same issue. Maybe it would be helpful to add a note to the documentation?
Thanks for making this package, it looks great.
I followed the directions to set up a new site. I was able to make a new project and create a remote repo with
wflow_use_github()
. Let's call it "lrdegeest/demo". I'm usingworkflowr_1.6.2
.However, after running
wflow_build()
andwflow_publish()
, I'm unable to push changes to the remote repository created bywflow_use_github()
and deploy the website.When I ran
wflow_use_github("lrdegeest")
I asked the package to create the remote repository:and when I run
wflow_status()
it confirms the project is Git tracked:But after I update and commit documents with
wflow_publish()
, I try to push to the remote repo withwflow_git_push("lrdegeest")
, and I get an error:I confirmed that the
origin
remote is tracked:So I checked
?wflow_git_remote
and then re-ran the push:but I get another error:
and I guess the reason is that there is in fact no upstream branch. Because when I run
git push
in the terminal I get:Did I miss a step somewhere? Not sure where to go from here.
Session info: