Added credentials
This commit is contained in:
@@ -76,3 +76,20 @@
|
||||
(check-false (file-exists? "remote.txt"))))
|
||||
(lambda ()
|
||||
(delete-directory/files tmp)))
|
||||
|
||||
;; HTTPS push without configured credentials must fail before entering libgit2.
|
||||
(let ([tmp2 (make-temporary-file "racket-git-https-test~a" 'directory)])
|
||||
(dynamic-wind
|
||||
void
|
||||
(lambda ()
|
||||
(parameterize ([current-directory tmp2])
|
||||
(git 'init)
|
||||
(configure!)
|
||||
(call-with-output-file "x.txt" #:exists 'truncate/replace
|
||||
(lambda (out) (displayln "x" out)))
|
||||
(git 'add "x.txt")
|
||||
(git 'commit "x")
|
||||
(git 'remote 'add "origin" "https://example.invalid/private/repo.git")
|
||||
(check-exn #rx"no HTTPS credentials are stored"
|
||||
(lambda () (git 'push)))))
|
||||
(lambda () (delete-directory/files tmp2))))
|
||||
|
||||
Reference in New Issue
Block a user