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

How can I connect VS 2017 and my Gitlab server ? #9

Closed
JulienBodin86 opened this issue May 22, 2017 · 33 comments
Closed

How can I connect VS 2017 and my Gitlab server ? #9

JulienBodin86 opened this issue May 22, 2017 · 33 comments

Comments

@JulienBodin86
Copy link

Hi !

I've just installed the extension on a VS 2017 instance. On the "Team Explorer" tab I can see a section "Gitlab", but I have nothing actionable for connecting to my gitlab server (See screenshot).

How am I supposed to do for connecting Visual studio and my Gitlab server ?

2017-05-22_18h55_02

@maikebing
Copy link
Owner

image

@JulienBodin86
Copy link
Author

Thanks :)

Of course it was the first thing i've tried.
From there I can connect to TFS or a "simple" git repository. Gitlab is not displayed.

@PirouzNik
Copy link

Hi I have the same problem... @JulienBodin86 did you solve it?

@anrichter
Copy link

+1
Same Problem here. See no GitLab UI elements on VS 2017.

@yannduran
Copy link

Why is this issue closed? I'm having the same problem on VS 2017 v15.5.7 in Feb 2018!

I haven't been able to find ANY way of connecting to a GitLab repo.

@maikebing maikebing reopened this Feb 22, 2018
@yannduran
Copy link

Well, by complete accident, I just stumbled over a place where I can actually sign in.

image

But it's pretty counter-intuitive for this to be the place to sign in. If I'm looking to clone a GitLab repo, but haven't yet been able to sign in, I'm not going to think to look on the Synchronisation tab.

You should be able to sign in through the Connect section, like @JulienBodin86 and I both assumed was the place to look. I'm pretty sure that most people will assume that's the place to sign in as well.

This GitLab section should not appear on the Home tab. It doesn't belong there.

image

It should appear as a section on the Connect tab, above or below the GitHub section.

image

If the user has not yet signed in, it should display the introductory text (like it currently does in the Home section) as well as the Login and Sign Up buttons (like it currently does in the Synchronisation tab).

Essentially, the experience should be the same for both GitHub and GitLab.

@TFreudi1
Copy link

I also impossible to me to find the Extension.
gitlab

@TFreudi1
Copy link

How can I use it ? VS2017 15.5.7

@TFreudi1
Copy link

Ok, sorry with the Back/Forward symbols in the team explorer view I see the Extension, but still I dont know how to use it.
@yannduran: Where I can find the Synchronisation Tab ? Should it have a valid Connection to a TFS? My TFS Connection is currently down because the Server is off for a week, did I see this tab when I be connected to a TFS?

@TFreudi1
Copy link

Oh man, OK , I must switch the Default sourcecodemanagement to git. Now I see the sync tab.
gitlab2

@maikebing
Copy link
Owner

💯

@yannduran
Copy link

@TFreudi1 Yes, you'll only see Git-related UI if you're using Git, as you've discovered. I'm glad that, like me, you've stumbled onto how to find a way to sign in.

@maikebing Would you care to make some comments on the UI changes that I've suggested? I'm curious to know whether you agree or disagree. I also have to add that, now that I've actually managed to sign in, I still see the GitLab "advertising" on the Home tab. It's VERY annoying!

@TFreudi1
Copy link

The Problem is ... I can sign in (local IP, local own gitlab Server) , it shows me the reposities but if I want to clone he replace my lokal IP 192.168.10.50 with localhost. The rest of the clone URL is correct.
@maikebing: should I open a new issue? I can't do any git function accept listing the repos.

@TFreudi1
Copy link

Thanks, you are right it is a gitlab problem ! It also shows me localhost in the WEB Site which has nothing to do with your plugin, Sorry maikebing!

@maikebing
Copy link
Owner

@yannduran
Each solution needs to be logged in again because Gitlab and GitHub differ in that it is possible that each solution comes from a different Gitlab server, and I keep the login information in the solution directory and cause some display exceptions if the status of the current solution is not refreshed in time.

@sagneta
Copy link

sagneta commented May 3, 2018

What's the trick to login to gitlab with the latest GitLab extension for 2017 MS Visual Studio.

I give it my username and password and the proper gitlab url and I get a Failed to Login 404 not found error. THere also is no place to insert an access token per the docs. I tried it as the password to no avail so the access token thing doesn't work. Have you guys had any luck?

@TFreudi1
Copy link

TFreudi1 commented May 4, 2018

Did you use a own gitlabserver ? I have my own and I have the latest vs2017 + gitlab Extension and it still works althoug I use sometimes the git commandline. Your accountdata is save in your Project path in .vs/.gitlab
I also have a token inside of that but I don't where it come from. The first connect attempt if you never uploaded your current Project Looks like this:
gitlab

My .gitlab:
{
"User": {
"Id": 4,
"Username": "thomasf",
"Name": "Thomas",
"Email": "xxx@gmx.de",
"AvatarUrl": "http://www.gravatar.com/avatar/801158a17ff79f18261e8ca?s=80&d=identicon",
"PrivateToken": "bSjp2......",
"Host": "http://192.168.10.50:10080",
"TwoFactorEnabled": false,
"ApiVersion": 0
}
}

@maikebing
Copy link
Owner

V1.0.160

Automatically detects the API version of Gitlab

@pedoc
Copy link

pedoc commented Dec 14, 2018

same problem,vs 2017 and vs2019 preview1.1
no one way is effective

@dtpthao
Copy link

dtpthao commented Jan 6, 2019

same problem vs 2017, impossible to find gitlab @pedoc did you fix it?
image
image
image

@TFreudi1
Copy link

TFreudi1 commented Jan 6, 2019

Did you make the GIT Sourcecodeplugin default ?
#9 (comment)
And you must use the entry with the fox symbol, what you use is the default gitlab Plugin from Microsoft.

@dtpthao
Copy link

dtpthao commented Jan 6, 2019

Yes, I did, nothing better. I just uninstalled VS and reinstall, I got connected now.

@GauriKudtarkar
Copy link

GauriKudtarkar commented Feb 1, 2019

I faced the same scenario where I wanted to connect to project in gitlab server from visual studio.
After many hrs of trying I found simplest way to connect :

  1. You first need to install Git for windows. You can download that from this site. https://git-scm.com/downloads
  2. Once git is installed then open .gitconfig file. you can find it in c drive=>users=>yourUserName=>.gitconfig file (open with notepad or notepad++)
  3. There you have to write following lines:
    [user]
    name = userName used to login to gitlab
    email = email id used for gitlab
    [http]
    proxy = http://domainName:port
    [https]
    proxy = http://domainName:port
    [credential]
    helper = manager

  1. Open windows credential Manager =>
    image
    Click on "Add a Generic Credential" - shown above.
  2. Enter details asked:
    Internet or Network Address=> git:https://gitlab.xxx.com --------here xxx will be your domain name or the address which you use to connect to gitlab server. Dont miss the "git:" part at start.

User Name: userName used to login to gitlab

Password: Enter the accessToken generated in gitlab.

Then click "OK"

You will see this name in generic credentials list
image

  1. Steps for how to create accessToken in gitlab:
    a) Go to gitlab account=> settings=> Access Tokens (left side panel) => Enter any valid name and expiration date => select all check boxes in Scopes => Click on "create personal Access Token" button.
    b) Screen will display an alphanumeric token. Copy it and save it for future use. Gitlab will not store it. This token will be used as a password in above step.
    Note: This token have expiry date.

  2. Open Visual Studio => Tools => Options => Source Control => Select "Git" in dropdown

  3. Open Team explorer => Manage Connections => Under Local Git Repositories => click on "Clone" and proceed.
    Visual studio will automatically use credentials and clone the repository.

Hope this will help someone.

@Ddog800
Copy link

Ddog800 commented Mar 14, 2019

Why is it 2019 and the UX with this extension is still such a mess? You should not need to go to the Sync tab to log in. This is not how VS is meant to operate. If you're going to build an extension for an application, you need to follow the established paradigms of the application. It should be done through the connect tab. Why is this issue closed? I just wasted 45 minutes trying to figure out why the extension was seemingly broken only to finally google this page with the instructions above.

Now that I've found where to sign in, I'm now unable to do so. I simply get login failed no matter which API level or option I choose, which also appears to be an old problem.

Guys, this extension really needs some UX work to be usable.

@yannduran
Copy link

yannduran commented Mar 14, 2019

Guys, this extension really needs some UX work to be usable.

@Ddog800 yes I agree. It would be best if the Gitlab extension behaved the same as the GitHub and VSTS (Azure Repos) ones behave.

And I agree that this issue should NOT be closed until it's been properly addressed.

@yannduran
Copy link

@yannduran
Each solution needs to be logged in again because Gitlab and GitHub differ in that it is possible that each solution comes from a different Gitlab server, and I keep the login information in the solution directory and cause some display exceptions if the status of the current solution is not refreshed in time.

@maikebing I really suggest that you look at the source code for GitHub's extension

@ChanceNCounter
Copy link

It's astonishing to me that this issue has been closed twice. It's now 2.5 years since it was opened for the first time, and every single aspect of the original complaint remains - plus, I can't figure out how to log out!

So, first I had the same experience as others above. I couldn't figure out where to log in, and a web search led me to the wiki, which does not explain where to log in, only what to enter in the various entirely self-explanatory text fields on a standard login form.

But that wiki page does lead to this issue, so thanks for that, I guess.

So I logged in, and the extension didn't connect to my project. Nothing changed in the repo view. I realized that this was probably because I connect to the project by SSH, but logged into the extension using HTTP. I don't know if it's possible to do it the other way, but I wanted to try, so I went looking for a "log out" button. I still haven't found one.

Hence, I resorted to uninstalling and reinstalling the extension, meaning I had to restart VS three times.

And I was still logged in. Someone else in this thread noted that your account info should be in the project folder, at .vs/.gitlab. There is no .gitlab in my project's .vs folder.

So now I have an extension from which I can't log out, which appears to be using a single project's server as the global server, and which isn't actually doing a single one of the things it's supposed to do.

In other words, I have a useless extension, which has put some data in a mysterious place on my system that I'll never even be able to remove.

Meantime, you (the author) responded to several minor questions, without responding to any of the serious issues raised herein, and this extension is still available right there through the main marketplace in Visual Studio itself, which means people will keep having this miserable experience until you do something about it.

Unacceptable.

@yannduran
Copy link

@ChanceNCounter

It's a real pain, but you can find and delete the extension's folder from the Extension folder in the following path. <your vs id> is the random value generated for your VS install. For VS 2019 it'll be 16.0_ + a random eight characters.

Type this into Windows Explorer:

%localappdata%\Microsoft\VisualStudio\<your vs id>\Extensions

In this folder you'll find many randomly named folders. Each one is for an installed extension. It's a pain because you' have to manually examine the contents of each folder to see if you can identify the one that contains the Gitlab extension.

Delete the folder you find, and that should delete the extension and its data from your VS install. To be extra certain, delete all of the files find at the bottom of the same Extensions folder that have that have .cache as their extension. Don't worry, those cache files will be regenerated by VS when it opens again.

I hope that helps you out.

If not I suggest that you open a new issue that only addresses the fact that you can't find a way to log out of the extension (titled something like "How Do I Log Out Of This GitLab Extension".

@maikebing this issue should not be closed as the UI concerns raised in it have not been addressed.

@maikebing maikebing reopened this Nov 12, 2019
@yannduran
Copy link

@maikebing it's great that you've re-opened this issue, thank you for doing that!

But are you going to be addressing any the UI issues that have been raised? It's been over two years without anything being done so far (as far as I know).

People are having trouble logging in and logging out! That needs to be fixed, n'est-ce pas?

@maikebing maikebing reopened this Nov 16, 2019
@maikebing
Copy link
Owner

@yannduran Thank you very much for your suggestion. I'm sorry to be busy with my work for the last two years. Later, I'll take the time to do something seriously.

@ChanceNCounter
Copy link

Did I fail to test this for six months?! I'm so sorry! I don't remember seeing the November notification, just the one this morning that closed the issue!

I'll flag this in my inbox to remind me to check it out next time I'm at a Windows box.

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