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 fails with "Not found" message #542

Closed
logological opened this issue Jun 26, 2016 · 5 comments
Closed

git fork fails with "Not found" message #542

logological opened this issue Jun 26, 2016 · 5 comments

Comments

@logological
Copy link

The git fork command doesn't work for me, no matter whether I specify HTTPS or SSH as the access method. It returns a "Not found" message when trying to access the repository I want to fork; this causes the subsequent creation and checkout of the fork to fail.

$ git fork [email protected]:edobashira/speech-language-processing.git
Enter your github username
logological
Enter host password for user 'logological':
{
  "message": "Not Found",
  "documentation_url": "https://developer.github.com/v3"
}
Cloning into 'speech-language-processing.git'...
remote: Repository not found.
fatal: repository 'https://github.com/logological/speech-language-processing.git/' not found
/usr/local/bin/git-fork: line 41: cd: speech-language-processing.git: No such file or directory
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
@spacewander
Copy link
Collaborator

@logological
Could you check out this branch #543 and confirm if the problem is fixed?

@logological
Copy link
Author

logological commented Jun 27, 2016

Still failing for me. Though on rereading the documentation, it seems the reason I got the error in the first place is that I didn't invoke the command correctly. The git fork command expects as its argument the URL of the project's GitHub web page, whereas I had been passing the URL used to clone the repository.

I expect this is not an unusual mistake – I was expecting git fork to act like git clone. Perhaps the command could be rewritten so that it also works with the usual clone URLs? Possibly all you need to do is remove the .git extension. (As far as I know, GitHub won't let you create a repository with this extension, so there should be no ambiguity.)

@spacewander
Copy link
Collaborator

@logological @hemanth
Sorry, it's my mistake...
I fix it in a new pr: #545
Could you check for it?

@spacewander spacewander reopened this Jun 27, 2016
@hemanth
Copy link
Collaborator

hemanth commented Jun 27, 2016

Merged.

@hemanth hemanth closed this as completed Jun 27, 2016
@logological
Copy link
Author

So is using the clone URL supposed to be supported now? It still doesn't work for me (and yes, I did enter my correct username and password):

$ git fork '[email protected]:rubo77/rsync-homedir-excludes.git'
Enter your github username
logological
Enter host password for user 'logological':
{
  "message": "Not Found",
  "documentation_url": "https://developer.github.com/v3"
}
Cloning into 'rsync-homedir-excludes.git'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/logological/rsync-homedir-excludes.git/'
/usr/local/bin/git-fork: line 45: cd: rsync-homedir-excludes.git: No such file or directory
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

The command does work if I pass it the bare user/repository name, though this checks out the fork via HTTPS rather than SSH:

$ git fork 'rubo77/rsync-homedir-excludes'                   
Enter your github username
logological
Enter host password for user 'logological':
…
 * [new branch]      master     -> upstream/master
$ git remote -v
origin  https://github.com/logological/rsync-homedir-excludes (fetch)
origin  https://github.com/logological/rsync-homedir-excludes (push)
upstream        https://github.com/rubo77/rsync-homedir-excludes (fetch)
upstream        https://github.com/rubo77/rsync-homedir-excludes (push)

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

3 participants