jaxbot / github-issues.vim

Github issue lookup in Vim
http://jaxbot.me/articles/github-issues-vim-plugin-5-7-2014
Other
406 stars 28 forks source link

ssh clone url doesn't work #115

Closed dlion closed 10 years ago

dlion commented 10 years ago

I cloned a repo from an organization and I have this remote conf

> git remote -v
origin  git@github.com:CsUnipa/Teorica.git (fetch)
origin  git@github.com:CsUnipa/Teorica.git (push)

everything works fine using git but when I open vim and try to use Gissues

github-issues.vim: Failed to find a suitable Github repository URL, sorry!

I have on my .vimrc a github token. Github-issues doesn't find my URL, why? I need a "https://" URL, maybe? Thank you

jaxbot commented 10 years ago

All my URLs are SSH, so I'm not sure why that's happening. What git version do you have?

dlion commented 10 years ago
git version 1.8.4

I use pathogen and I have updated github-issues 20 minutes ago.

jaxbot commented 10 years ago

Hmm... that version is a little old but should be totally fine. I'm on the clock right now but I'll dig into this asap. In the meantime, you can try replacing the URLs with the HTTP ones in the .git/config file.

Also, have you set any g:github or g:gissue variables?

dlion commented 10 years ago

I tried to remove and recloning the plugin but nothing is changed.

In my .vimrc I have only the github token and this afternoon the plugin works well (with ssh url worked perfect) but after the last upgrade it doesn't find nothing anymore.

update: I tried to change ssh to https but it doesn't work, seems that the last upgrade have "corrupted" something. I recloned my plugin from this repo so I have the last commit.

jaxbot commented 10 years ago

Does checking out f963afcbe06dbf06075550d5ea1b12015b4d6dd6 work?

dlion commented 10 years ago

Now it works! I can see my issues list

jaxbot commented 10 years ago

Looks like the @blueyed changes to the git remote broke something in your case. Need to look into that

dlion commented 10 years ago

Reading the https://github.com/jaxbot/github-issues.vim/commit/1a370d4d6643821596deb09bd224258d95c583b7 commit seems that repourl variable is empty in all cases

jaxbot commented 10 years ago

https://github.com/jaxbot/github-issues.vim/blob/1a370d4d6643821596deb09bd224258d95c583b7/autoload/ghissues.vim#L58

blueyed commented 10 years ago

@dlion Could you add / uncomment some print statements to see what's going on? Maybe it's not separated with a tab ("\t") in your case? (https://github.com/jaxbot/github-issues.vim/blob/master/autoload/ghissues.vim#L76)

Also the output of the following commands in the repo would be useful:

git rev-parse --verify --symbolic-full-name @{upstream}
git symbolic-ref --short HEAD
blueyed commented 10 years ago

@jaxbot What are you referring to in your last comment?

jaxbot commented 10 years ago

He said the repourl = "" in all cases. The highlighted case is the one I found where it is not. Sorry for short replies; can't talk much right now

blueyed commented 10 years ago

@jaxbot You were referring to an old commit/tree, which confused me.

jaxbot commented 10 years ago

That's the one that he linked

dlion commented 10 years ago
git rev-parse --verify --symbolic-full-name @{upstream}
refs/remotes/origin/master

and

git symbolic-ref --short HEAD
master

How I said the problem is in every single repo on my computer when I checked on the last commit but now (f963afcbe06dbf06075550d5ea1b12015b4d6dd6) everything works fine.

blueyed commented 10 years ago

Oh. This PR should fix it - I've thought it was merged already: https://github.com/jaxbot/github-issues.vim/pull/113/files

blueyed commented 10 years ago

It's mainly because git rev-parse is missing --abbrev-ref.

jaxbot commented 10 years ago

Pull that PR and if it works for @dlion, I'll merge it in. Sorry for being so unhelpful right now; at work

jaxbot commented 10 years ago

Eh, I merged it, pull down master and tell me if it works

dlion commented 10 years ago

Now it seems work fine! Thank you very much :+1:

jaxbot commented 10 years ago

Awesome. Apologies for the inconvenience, and thanks for the help! Can I close this?

jaxbot commented 10 years ago

Also thanks @blueyed for the changes/fixes/support ;)

dlion commented 10 years ago

Don't worry man, nice works. Thanks to @blueyed too!

blueyed commented 10 years ago

You're welcome! Good that there was a fix already.. :)