Skip to content

[R-pkg-devel] GitHub problems

3 messages · Max Turgeon, Spencer Graves

#
Hello, All:


 ????? I've been unable to get SSH to work with 
"https://github.com/JamesRamsay5/fda", documented in my email to this 
group almost 3 weeks ago.? I've been able to do "git clone 
https://sbgraves237:<GitHub-password>@github.com/JamesRamsay5/fda", then 
change a file, do "git commit" and "git push".


 ????? However, this has my GitHub password in a plain text ".git" file 
on my hard drive.? I think the hard drive on my computer is encrypted, 
so maybe that's not a problem.


 ????? Am I not allowed to use SSH with a GitHub repository that's not 
my own?


 ????? Thanks,
 ????? Spencer Graves


p.s.? Since my previous email, Ramsay added "README.md" to that 
repository.? I can do "git clone" and get it, then edit it, then "git 
commit".? However, "git push" keeps giving me errors:


git push
remote: Invalid username or password.
fatal: Authentication failed for 
'https://<token>@github.com/JamesRamsay5/fda/'


 ????? A few hours ago, the owner, JamesRamsay5, went to "Settings" > 
"Manage access", then invited me as a collaborator.? I got an email 
asking me to "view invitation", which I did.? I got another email 
saying, "Hey there, we?re just writing to let you know that you?ve been 
automatically subscribed to a repository on GitHub." Sadly, I still 
couldn't access it, so I I deleted my token and created a new one.? I 
also deleted my previous local clone of "fda" and recreated it using? 
"git clone https://<token>@github.com/JamesRamsay5/fda".? Then I did a 
test edit to the one file in that repository, README.md.? I think did 
'git commit README.md -m "tst edit"'.? Then "git push" keeps giving me 
the error just mentioned.


 > sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.4

Matrix products: default
BLAS: 
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: 
/Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats???? graphics? grDevices utils???? datasets
[6] methods?? base

loaded via a namespace (and not attached):
[1] compiler_3.6.3 tools_3.6.3
On 2020-03-14 02:33, Spencer Graves wrote:

  
  
#
Hi Spencer,


Did you follow the instructions here? https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh


Once the key is setup, you should be able to do "git clone git at github.com:JamesRamsay5/fda.git", without any need to input a token or a password in the command. Similarly, git push/pull/fetch should all work seamlessly.


This is how I've used Github for many years, and it's always worked fine.


Best,

Max

Connecting to GitHub with SSH - GitHub Help<https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh>
help.github.com
You can connect to GitHub using SSH.





Max Turgeon
Assistant Professor
Department of Statistics
Department of Computer Science
University of Manitoba
maxturgeon.ca<http://maxturgeon.ca>
#
Hi, Max et al.:


 ??? ? With SSH established:


git clone git at github.com:JamesRamsay5/fda.git


 ??? ? Worked.


 ????? I had tried something like "git clone 
git at github.com:JamesRamsay5/fda.git" before, but I either did not have 
that exact syntax or I tried that before I had SSH.


 ????? Thanks again,
 ????? Spencer Graves
On 2020-04-03 15:17, Max Turgeon wrote: