Package share on git from RStudio

I want to be able to host my R package on github. And want to be able to do it from within RStudio IDE. I am able to host files on git direct from RStudio. But, not able to pull/push "package" files. Followed this example here from R packages book by Hadley/Jenny, but still not able to push the package files to git. Help!

Here is what I've tried.

Hope some one can take a look... Again, I can push/pull to git for new projects. Tells me my git authentication is setup correctly.

"FIle -> New Directory -> New Project "

but NOT for R packages

"File -> New Directory -> R packages"

Here is what I try to push from terminal CLI

$ git remote add origin
fatal: remote origin already exists.
$ git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Ok, it was an authentication issue with github. I used ssh instead of http. In case someone else run into the same here are the steps I followed.

Go to the .git directory

$cd ~packages/pkg2/.git

2/ remove the orig url (it was http)
$ git remote rm origin

3/ Add ssh URL

$ git remote add origin

4/ Update ssh

$ cat ~/.ssh/
$ ssh -T
Hi abiyug! You've successfully authenticated, but GitHub does not provide shell access.

5/ Now to synchronize with github
$ git push -u origin master

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.