Граф коммитов

7 Коммитов

Автор SHA1 Сообщение Дата
Mislav Marohnić b33ab4f466 Handle all sorts of weird git remote URLs
- git+ssh://github.com/...
- ssh://github.com:22/...
- git@github.com:/...

Fixes #876
2016-01-22 01:28:31 +11:00
Jingwen Owen Ou 44d1fa7f48 Fix Go tests on Windows
A couple of Go tests failure on Windows, fix code or tests to make them green:

--- FAIL: TestSaveAlwaysReportOption (0.15 seconds)
panic: remove C:\Users\IEUser\AppData\Local\Temp\test-repo999546479\test.git: Th
e process cannot access the file because it is being used by another process. [r
ecovered]
        panic: remove C:\Users\IEUser\AppData\Local\Temp\test-repo999546479\test
.git: The process cannot access the file because it is being used by another pro
cess.

--- FAIL: TestRunnerCallCommands (0.00 seconds)
        assert.go:15: V:/src/github.com/github/hub/commands/runner_test.go:42
        assert.go:24: ! 0 != 1

--- FAIL: TestEditor_openAndEdit_deleteFileWhenOpeningEditorFails (0.00 seconds)
        assert.go:15: V:/src/github.com/github/hub/github/editor_test.go:34
        assert.go:36: !  Failure

--- FAIL: TestGitHubRepo_OriginRemote (0.16 seconds)
        assert.go:15: V:/src/github.com/github/hub/github/localrepo_test.go:18
        assert.go:24: ! "V:\\src\\github.com\\github\\hub\\fixtures\\test.git" !
= "ssh://V/%5Csrc%5Cgithub.com%5Cgithub%5Chub%5Cfixtures%5Ctest.git"
2014-11-20 19:36:32 -08:00
Jingwen Owen Ou 95bd9440df Ignore looking into ssh config if URL scheme is http or https
See https://github.com/github/hub/issues/681
2014-11-16 12:21:56 -08:00
Jingwen Owen Ou aab2e5f9d3 Ignore replacing ssh host that fixes limited network
ssh.github.com is a hack for people on limited networks to be able to use SSH through HTTPS port. We should ignore replacing it when constructing URLs.

As part of the fix, refactor into SSHConfig and SSHConfigReader to make code testable. It also fixes a bug on `hostReStr` that doesn’t match the “Hostname” string in ssh config.

Issue: https://github.com/github/hub/issues/672
2014-11-03 08:42:00 -08:00
Mislav Marohnić 8860670ec8 Resolve SSH host aliases by reading from `~/.ssh/config`
This allows someone to have something like this in their SSH config:

    Host gh
      HostName github.com

And then use git remote URLs such as:

    gh:myname/myrepo.git

Since git itself allows people to do this, we need to support it in hub.
2014-07-28 11:08:55 -07:00
Jingwen Owen Ou e057287b85 Flex on SSH URL 2013-12-10 13:42:53 -08:00
Jingwen Owen Ou a270fd25f6 Import cucumber tests from Hub and get the pull_request.feature going a bit 2013-12-10 13:42:52 -08:00