Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ssh cloning authentication error feedback #173

Open
snomos opened this issue Mar 19, 2022 · 1 comment
Open

Improve ssh cloning authentication error feedback #173

snomos opened this issue Mar 19, 2022 · 1 comment
Projects

Comments

@snomos
Copy link
Member

snomos commented Mar 19, 2022

I have run the following command when setting up a new machine:

gut init -r /Users/smo036/langtech/gut -t ghp_TOKEN -o giellalt

And tested that the token has the correct credentials:

curl -H "Authorization: token ghp_TOKEN" https://api.github.com/users/codertocat -I
HTTP/2 200 
server: GitHub.com
date: Sat, 19 Mar 2022 08:40:56 GMT
content-type: application/json; charset=utf-8
content-length: 1340
cache-control: private, max-age=60, s-maxage=60
vary: Accept, Authorization, Cookie, X-GitHub-OTP
etag: "908dbc7a547142520f56ef556f6f4822c2ea88bbd13d61c5fa2a4caadf99d045"
last-modified: Tue, 04 Jan 2022 03:25:08 GMT
x-oauth-scopes: admin:org, admin:org_hook, admin:repo_hook, delete:packages, delete_repo, notifications, repo, user, workflow, write:discussion, write:packages
x-accepted-oauth-scopes: 
x-github-media-type: github.v3; format=json
x-ratelimit-limit: 5000
x-ratelimit-remaining: 4999
x-ratelimit-reset: 1647682856
x-ratelimit-used: 1
x-ratelimit-resource: core
access-control-expose-headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
access-control-allow-origin: *
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
content-security-policy: default-src 'none'
vary: Accept-Encoding, Accept, X-Requested-With
x-github-request-id: EAF2:7D77:51F91E:57B35C:62359717

Still, I get the following error when trying to clone:

gut clone -o divvun -r ^registry
 2022-03-19T08:57:53.952Z DEBUG gut > Arguments: Args { command: Clone(CloneArgs { organisation: Some("divvun"), regex: Some(Filter { regex: ^registry }), use_https: false }) }
 2022-03-19T08:57:54.774Z DEBUG gut::git::clone > Clone "[email protected]:divvun/registry.git" to "/Users/smo036/langtech/gut/divvun/registry"
+------------------+
| Repo      Status |
+==================+
| registry  Failed |
+------------------+

There 1 errors when cloning:

+--------------------------------------------------------------------------------------------+
| Repo      Error                                                                            |
+============================================================================================+
| registry  Cannot clone repository with [email protected]:divvun/registry.git because of faile |
|           d authentication for repository                                                  |
|                                                                                            |
|           Caused by:                                                                       |
|               failed authentication for reposi                                             |
|           tory                                                                             |
+--------------------------------------------------------------------------------------------+

gut does not give very much details. What is going wrong? Any help appreciated, @bbqsrc and @lenguyenthanh 🙂

@snomos
Copy link
Member Author

snomos commented Mar 19, 2022

Using -u / https when cloning fixed it.

@snomos snomos changed the title Strange authentication error - need help ssh cloning authentication error Mar 19, 2022
@snomos snomos added this to To do in Gut project via automation Jun 20, 2022
@snomos snomos changed the title ssh cloning authentication error Improve ssh cloning authentication error feedback Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Gut project
  
To do
Development

No branches or pull requests

1 participant