Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Conversation

@alcortesm
Copy link
Contributor

Continuation of #3.

From #3, @mcuadros said:

I dont understand how the your AuthMethods works, how I should set for example the credentials here:
https://github.com/src-d/go-git/pull/3/files#diff-93a872f722160e3c55c4194ccfb29664R57

BTW can you squash

It was my fault, I accidentally kept some fields private in the structs. My tests were all internal, so I didn't notice the problem.

I have fixed that, now it should be pretty easy to understand.

In any case, here is an example program that illustrates this new functionality. It is a program that tries to connect to a github repo by ssh:

  • if a password is provided (not secure, this is just an example) then it tries password auth (not going to work, github does not accept password auth).
  • if no password is provided, it tries to connect to a running ssh agent and let it resolve the authentication with the server.

Example of use:

; go-git-ssh-demo git@github.com:alcortesm/go-git.git
Successful Connection
; go-git-ssh-demo git@github.com:alcortesm/go-git.git asdfasdf
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
exit status 1

PS: I have also squash all the commits.

@codecov-io
Copy link

Current coverage is 68.83%

Merging #5 into v2.0.0 will not affect coverage as of 48d2d2f

@@            v2.0.0      #5   diff @@
======================================
  Files           13      13       
  Stmts          892     892       
  Branches       141     141       
  Methods          0       0       
======================================
  Hit            614     614       
  Partial         72      72       
  Missed         206     206       

Review entire Coverage Diff as of 48d2d2f

Powered by Codecov. Updated on successful CI builds.

mcuadros added a commit that referenced this pull request Nov 17, 2015
@mcuadros mcuadros merged commit 02f34c0 into src-d:v2.0.0 Nov 17, 2015
@alcortesm alcortesm deleted the ssh branch November 18, 2015 07:58
mcuadros added a commit that referenced this pull request Jan 31, 2017
gsalingu-ovhus pushed a commit to gsalingu-ovhus/go-git that referenced this pull request Mar 28, 2019
Fix : Check if upload is removable on delete handler, and return 404 is ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants