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 (try 2) #317

Merged
merged 1 commit into from
Jan 30, 2018

Conversation

ijlyttle
Copy link
Contributor

Replaces #316

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.

  • introduces ssh_path()
  • integrates ssh_path() into cred_ssh_key() and ssh_key_needs_passphrase()

Signed-off-by: Ian J. Lyttle ian.lyttle@schneider-electric.com

- integrates ssh_path() into cred_ssh_key() and ssh_key_needs_passphrase()

Signed-off-by: Ian J. Lyttle <ian.lyttle@schneider-electric.com>
@ijlyttle ijlyttle mentioned this pull request Jan 30, 2018
@ijlyttle
Copy link
Contributor Author

ijlyttle commented Jan 30, 2018

Transferring from #316:

@stewid I have installed afe2961 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):

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 78.428% when pulling afe2961 on ijlyttle:cred_ssh_key-windows2 into ef3261a on ropensci:master.

@stewid
Copy link
Member

stewid commented Jan 30, 2018

I'll look at it later today

@stewid stewid merged commit 2b89310 into ropensci:master Jan 30, 2018
@stewid
Copy link
Member

stewid commented Jan 30, 2018

I have studied the code and I think the error is unrelated to the ssh_path function.

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