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

14 Коммитов

Автор SHA1 Сообщение Дата
Austin Ziegler c4af574b19
Change default protocol to HTTPS (#2939)
Explicitly setting `hub.protocol` to `git` or using `HUB_PROTOCOL=git`
still uses the `git` protocol.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-03-25 17:46:40 +01:00
Mislav Marohnić a64f9d5939 Switch to "the output should not contain anything" built-in step 2019-08-21 18:23:50 +02:00
Mislav Marohnić 28c5839d76 Identify repos explicitly in `clone` and `submodule` cukes 2016-08-09 22:07:33 +02:00
Mislav Marohnić 8e212d4892 Dereference repo name when cloning
This ensures that the final repository URL cloned will have the
repository's actual name after redirect.
2016-08-09 22:07:33 +02:00
Mislav Marohnić c3ddec3248 Improve detecting local clone resources
In `hub clone NAME`, "NAME" was previously considered a local resource
if a directory of the same name existed, and the clone command was left
unchanged.

That worked for a while, but some users were surprised that they
couldn't clone their repo named "NAME", only to discover that there was
an unrelated directory "NAME" in the current working directory.

Also, a git bundle is a valid cloneable resource, but is a file and not
a directory.

This refines the detection of cloneable resources. "NAME" is considered
to be locally cloneable if one of the following is true:

- "NAME/.git" exists
- "NAME" is a bare git repo
- "NAME" is a file whose first line includes "git bundle"
2016-01-22 20:47:51 +11:00
Mislav Marohnić 93eccff35d Check if GitHub repo exists before every `hub clone`
If it doesn't exist, print a more helpful error message about it so the
user knows which "owner/repo" pair was tested.
2015-09-27 22:42:49 +02:00
Leonardo Pistone 339125b89a improve expectation for hub --noop clone
As suggested by @mislav, the the previous assertion only checked against
"git clone" without parameters.
2014-07-17 02:14:13 +02:00
Leonardo Pistone b14337569c same logic when clone --noop private repos. Fixes #593 2014-07-15 16:55:24 +02:00
Mislav Marohnić bb452223b6 Add test that project wiki can be cloned 2014-07-11 11:40:59 -07:00
Mislav Marohnić b2fd8dfd1c Enable cloning private repos
Since cloning of private repos over `git:` protocol is not possible,
users were required to manually add the `-p` flag to trigger cloning
over the `ssh:` protocol.

Now, use the GitHub API to obtain information about the repo to be
cloned, and automatically use the `ssh:` protocol if the repo is private
or if the current user has push access to that repo.

Fixes #212, fixes #213
2013-12-22 00:25:37 +01:00
Mislav Marohnić f52c0a5061 Rewrite API auth to allow Enterprise email login
API authentication and persisting of credentials in Config was
convoluted and inflexible, and it wasn't possible to log in with
different credentials than your GitHub screen name. Since Enterprise
supports different authentication schemes, it's important to allow
emails for login as well (or any string for that matter) and retrieve
the user's screen name after successful authentication.

This also improves handling special characters in Basic Auth usernames
and passwords.

Fixes #407
2013-12-19 17:01:44 +01:00
Ethan Zhuang 65c4d6674a support repos whose name starts with a period 2012-07-16 08:35:02 +02:00
Mislav Marohnić 12a6196552 fix prompting for GitHub username in `create` command
Fixes #177
2012-05-07 21:27:36 +02:00
Mislav Marohnić 501e20b8d7 rewrite `clone`, `remote add`, `submodule add` tests as cukes 2012-05-04 20:13:54 +02:00