I think I found the problem. On this line:

https://github.com/racket/racket/blob/master/racket/collects/pkg/private/checkout-credentials.rkt#L10
 
<https://github.com/racket/racket/blob/master/racket/collects/pkg/private/checkout-credentials.rkt#L10>

The variable `credentials-list` starts out as

[credentials-list (cons #f (get-git-checkout-credentials))]

My correct checkout credentials do appear in `(get-git-checkout-credentials)`. 
But on the next line we have:

(define credentials (first credentials-list))

So the first value assigned to `credentials` is #f. This percolates through, 
and when I run this command:

raco pkg install https://github.com/mbutterick/app.git

The args received by `git-checkout` are:

host = "github.com"
repo = "mbutterick/app.git"
dest-dir = #f
transport = 'https
ref = "master"
given-depth = 1
initial-error = #<procedure:...rivate/stage.rkt:752:41>
given-tmp-dir = #f
clean-tmp-dir? = #t
verify? = #t
given-port = #f
strict-links? = #f
username = #f
password = #f

Notice the username and password are #f.

But when I go back to "checkout-credentials.rkt" and change this expression:

[credentials-list (cons #f (get-git-checkout-credentials))]

To this:

[credentials-list (get-git-checkout-credentials)]

Then my username and password get passed to `raco pkg install 
https://github.com/mbutterick/app.git`, and everything works as expected:

host = "github.com"
repo = "mbutterick/app.git"
dest-dir = #f
transport = 'https
ref = "master"
given-depth = 1
initial-error = #<procedure:...rivate/stage.rkt:752:41>
given-tmp-dir = #f
clean-tmp-dir? = #t
verify? = #t
given-port = #f
strict-links? = #f
username = "mbutterick"
password = "password"

Notice that the username and password now get passed through.





> On Oct 25, 2017, at 6:50 PM, Jay McCarthy <jay.mccar...@gmail.com> wrote:
> 
> Mmm, that SHOULD be the same code path as what `raco pkg` is using.
> Could you plop an eprintf on this line and see what arguments `raco
> pkg` is giving `git-checkout` and we can see what code is at fault?
> 
> https://github.com/racket/racket/blob/master/racket/collects/net/git-checkout.rkt#L54
> 
> On Wed, Oct 25, 2017 at 2:55 PM, Matthew Butterick <m...@mbtype.com> wrote:
>> The command seems to work when I remove the .git suffix:
>> 
>> racket -l net/git-checkout -- --https -u mbutterick -p password github.com 
>> /mbutterick/app test
>> 
>> Output:
>> 
>> Contacting github.com
>> Getting refs
>> Getting 24 objects
>> Applying deltas
>> Extracting tree to test
>> Cleaning up
>> "315d1dee1f9e3f90587171d13cc4477756156300"
>> 
>> 
>> 
>>> On Oct 25, 2017, at 10:08 AM, Jay McCarthy <jay.mccar...@gmail.com> wrote:
>>> 
>>> Will you try this first so we can debug the protocol level stuff?
>>> 
>>> racket -l net/git-checkout -- --https -u mbutterick -p password
>>> github.com /mbutterick/repo.git test
>>> 
>>> You may need to fiddle with the second to last argument.
>>> 
>>> On Tue, Oct 24, 2017 at 6:00 PM, Matthew Butterick <m...@mbtype.com> wrote:
>>>> PS Same behavior on Ubuntu 14.04 or Mac OS 10.12.6, using Racket 6.10.1 in
>>>> both cases.
>>>> 
>>>> 
>>>> On Oct 24, 2017, at 2:57 PM, Matthew Butterick <m...@mbtype.com> wrote:
>>>> 
>>>> Things seem to be on the right track, and then fail:
>>>> 
>>>> Querying Git references for app at http://github.com/mbutterick/app.git
>>>> ssl-connect: connect failed (error:140770FC:SSL
>>>> routines:SSL23_GET_SERVER_HELLO:unknown protocol)
>>>> [long traceback]
>>>> 
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> -=[     Jay McCarthy               http://jeapostrophe.github.io    ]=-
>>> -=[ Associate Professor        PLT @ CS @ UMass Lowell     ]=-
>>> -=[ Moses 1:33: And worlds without number have I created; ]=-
>> 
> 
> 
> 
> -- 
> -=[     Jay McCarthy               http://jeapostrophe.github.io    ]=-
> -=[ Associate Professor        PLT @ CS @ UMass Lowell     ]=-
> -=[ Moses 1:33: And worlds without number have I created; ]=-

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to