Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cred_ssh_key() defaults #316

Closed
wants to merge 79 commits into from

Conversation

ijlyttle
Copy link
Contributor

Fixes #314

Adds a function ssh_path(), in the footsteps of @jennybc's git_user_dot_home()

Puts that function to use for the defaults in cred_ssh_key().

I don't see a test-file for credentials - I could add one if you think it useful.

Signed only most-recent commit, due to late reading of contribution guidelines.

stewid and others added 12 commits January 18, 2018 23:02
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Ian J. Lyttle <ian.lyttle@schneider-electric.com>
@jennybc
Copy link
Member

jennybc commented Jan 22, 2018

@ijlyttle So if you install this version of git2r, does it have the effect you'd hope in this exercise re: usethis::use_github()? I think it should make all the friction go away ... perhaps up to the passphrase issue.

@ijlyttle
Copy link
Contributor Author

@jennybc I still can't get ssh-agent to work, so this will be (my) immediate path to success on Windows:

usethis::use_github(credentials = git2r::cred_ssh_key())

It does not yet work - I think this has to do with #312

Error in git2r::push(r, "origin", "refs/heads/master", credentials = credentials) : 
  Error in 'git2r_push': 'credentials' must be a S4 class with credentials
> str(git2r::cred_ssh_key())
List of 3
 $ publickey : chr "C:\\Users\\username\\.ssh\\id_rsa.pub"
 $ privatekey: chr "C:\\Users\\username\\.ssh\\id_rsa"
 $ passphrase: chr "*****"
 - attr(*, "class")= chr "cred_ssh_key"

@stewid
Copy link
Member

stewid commented Jan 22, 2018

@ijlyttle Thanks. I think I need about a week to finish #312

Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>
@stewid
Copy link
Member

stewid commented Jan 29, 2018

@ijlyttle I have merged #312. Could you please try again.
Thanks

@ijlyttle
Copy link
Contributor Author

rebasing now - will test asap

@jennybc
Copy link
Member

jennybc commented Jan 29, 2018

Whatever happened here Git-wise isn't ... quite done yet? @ijlyttle it's hard to see your changes, amidst all the others. Can you update your master branch from master on ropensci/git2r, rebase your PR branch onto that, then force push to your PR branch?

@ijlyttle
Copy link
Contributor Author

ijlyttle commented Jan 29, 2018

@jennybc I rebased onto master on ropensci/git2r - although it took some convincing. Is it looking any better?

If it is well-and-truly hosed, I can start the PR again from scratch - my changes were not that many.

@ijlyttle
Copy link
Contributor Author

@stewid I have installed f8ec75e on both my Mac and PC, and I run:

git2r::push(".", "origin", "refs/heads/master", credentials = git2r::cred_ssh_key())

On the Mac, it seems to work OK.

On the PC, I get a strange error:

Error in is_detached(repo) : 
  Error in 'git2r_repository_head_detached': Invalid repository

The repo is otherwise normal (from the terminal git status says all is well)

@ijlyttle
Copy link
Contributor Author

closing in favor of #317

@ijlyttle ijlyttle closed this Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants