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

git fork -- Permission Denied Public Key #198

Closed
sunnyrjuneja opened this issue Feb 26, 2014 · 5 comments
Closed

git fork -- Permission Denied Public Key #198

sunnyrjuneja opened this issue Feb 26, 2014 · 5 comments

Comments

@sunnyrjuneja
Copy link

I'm having a problem with using any gh command that interacts directly with my github account. For example, if I was to clone this repository using gh clone jingweno/gh and then entered the directory and then tried gh fork, it would print the following stack trace. Oddly enough, a fork appears in my list of repositories and a remote is added but I can't push to it.

Updating whatasunnyday
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch whatasunnyday
@owenthereal
Copy link
Owner

@whatasunnyday I've no problem using gh in this workflow:

$  g clone github/hub
Cloning into 'hub'...
remote: Reusing existing pack: 8184, done.
remote: Counting objects: 108, done.
remote: Compressing objects: 100% (107/107), done.
remote: Total 8292 (delta 51), reused 0 (delta 0)
Receiving objects: 100% (8292/8292), 2.61 MiB | 1.41 MiB/s, done.
Resolving deltas: 100% (4683/4683), done.
$ g fork
Updating jingweno
From https://github.com/jingweno/hub
 * [new branch]      1.11-stable -> jingweno/1.11-stable
 * [new branch]      gh         -> jingweno/gh
 * [new branch]      gh-pages   -> jingweno/gh-pages
 * [new branch]      gh-release-improvements -> jingweno/gh-release-improvements
 * [new branch]      master     -> jingweno/master
new remote: jingweno
$ g remote -v
jingweno        https://github.com/jingweno/hub.git (fetch)
jingweno        https://github.com/jingweno/hub.git (push)
origin  https://github.com/github/hub.git (fetch)
origin  https://github.com/github/hub.git (push)

What version of gh are you using?

@sunnyrjuneja
Copy link
Author

git version 1.8.4
gh version 2.0.0

@owenthereal
Copy link
Owner

@whatasunnyday Looks like the version is good. I'm using 2.0.0 locally too. What's your output of git remote -v. It's possible git clone jingweno/gh generates a private repo url.

@sunnyrjuneja
Copy link
Author

hey @jingweno,

gh clone jingweno/gh && cd gh
gh fork
Updating whatasunnyday
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch whatasunnyday

git remote -v
origin  git://github.com/jingweno/gh.git (fetch)
origin  git://github.com/jingweno/gh.git (push)
whatasunnyday   git@github.com:whatasunnyday/gh.git (fetch)
whatasunnyday   git@github.com:whatasunnyday/gh.git (push)

@owenthereal
Copy link
Owner

This should be fixe din the latest hub 2.2.0 release: https://github.com/github/hub/releases/tag/v2.2.0-rc1. Please give it a shot. Note that moving forward gh will be merged with hub and known as GitHub CLI. I'll provide a migration path from gh to hub in the near future. Please reopen if the problem still exists in hub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants