How to connect gitlab repository in phpstorm?

Previously, github and gitlab worked for me, but more recently, gitlab stopped working.

At the same time, if I execute the git push command, commits are uploaded to the repository.

There is a suspicion that gitlab has stopped working due to a change in authorization on github through a token.

But to add a setting for gitlab, like github in phpstorm is impossible.

Is there a way to make gitlab work in phpstorm without using ssh?

5 comments
Comment actions Permalink

What OS are you using? And what does PhpStorm say in the Event log when you try to push/pull?

0
Comment actions Permalink

I am using windows 10 x64 latest version.

I try to push commits:

http://prntscr.com/nl85cu

But I see the password request window:

http://prntscr.com/nl82zb

The entered password is not accepted, the window is displayed again.

http://prntscr.com/nl82zb

The password is correct, I am sure. I tried it directly on the gitlab: logged out, login with the password - everything is ok.

If I close the login window - an error happened.

22:03 Push failed
Remote: HTTP Basic: Access denied
Authentication failed for 'https://gitlab.com/......-theme.git/'

http://prntscr.com/nl851a

If this is important, on gitlab I have 2 factor authentication.

Command line git works fine and push into gitlab without any problem.

github authorization in phpstorm is done through access token.

http://prntscr.com/nl866k

0
Comment actions Permalink

> Is there a way to make gitlab work in phpstorm without using ssh?

You should be able to just add gitlab repo using VCS - Git - Remotes. Could you please restart PhpStorm, reproduce this and upload somewhere the idea.log file (Help > Show log in ...) so we could inspect it? 

0
Comment actions Permalink

I had git remote connected here, 

but I deleted it and tried to add it again

http://prntscr.com/nm1roe

A password is requested, but a password is not accepted. The password is entered correctly, checked by entering the gitlab in the browser.

http://prntscr.com/nm1ttt

 

idea.log

2019-05-08 17:44:06,412 [27858280]   INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 188 ms 
2019-05-08 17:44:14,255 [27866123] INFO - tellij.openapi.util.IconLoader - replace '/actions/commit.svg' with '/icons/actions/commit.svg'
2019-05-08 17:44:14,262 [27866130] INFO - tellij.openapi.util.IconLoader - replace '/actions/checkOut.svg' with '/icons/actions/checkOut.svg'
2019-05-08 17:44:14,268 [27866136] INFO - tellij.openapi.util.IconLoader - replace '/actions/diagramDiff.svg' with '/icons/actions/diagramDiff.svg'
2019-05-08 17:44:14,275 [27866143] INFO - tellij.openapi.util.IconLoader - replace '/vcs/Shelve.svg' with '/icons/vcs/Shelve.svg'
2019-05-08 17:44:15,350 [27867218] INFO - tellij.openapi.util.IconLoader - replace '/actions/showAsTree.svg' with '/icons/actions/showAsTree.svg'
2019-05-08 17:44:15,364 [27867232] INFO - tellij.openapi.util.IconLoader - replace '/vcs/push.svg' with '/icons/vcs/push.svg'
2019-05-08 17:44:18,269 [27870137] INFO - tellij.openapi.util.IconLoader - replace '/actions/edit.svg' with '/icons/actions/edit.svg'
2019-05-08 17:45:32,945 [27944813] INFO - #git4idea.commands.GitHandler - git ls-remote took 25881 ms. Command parameters:
"C:\Program Files\JetBrains\PhpStorm 2018.3.1\bin\runnerw64.exe" "C:\Program Files\Git\bin\git.exe" -c credential.helper= -c core.quotepath=false -c log.showSignature=false ls-remote https://gitlab.com/AndreyFomenko/drupal-moto-theme.git
2019-05-08 17:45:40,207 [27952075] WARN - a.remote.GitDefineRemoteDialog - Invalid remote. Name: [origin], URL: [https://gitlab.com/AndreyFomenko/drupal-moto-theme.git], error: Remote URL test failed: remote: HTTP Basic: Access denied<br/>Authentication failed for 'https://gitlab.com/AndreyFomenko/drupal-moto-theme.git/'
2019-05-08 17:46:39,289 [28011157] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 48 ms
2019-05-08 17:47:44,986 [28076854] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 23 ms
2019-05-08 17:47:49,053 [28080921] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 19 ms
2019-05-08 17:49:43,806 [28195674] INFO - #git4idea.commands.GitHandler - git ls-remote took 62951 ms. Command parameters:
"C:\Program Files\JetBrains\PhpStorm 2018.3.1\bin\runnerw64.exe" "C:\Program Files\Git\bin\git.exe" -c credential.helper= -c core.quotepath=false -c log.showSignature=false ls-remote https://gitlab.com/AndreyFomenko/drupal-moto-theme.git
2019-05-08 17:49:43,856 [28195724] WARN - a.remote.GitDefineRemoteDialog - Invalid remote. Name: [origin], URL: [https://gitlab.com/AndreyFomenko/drupal-moto-theme.git], error: Remote URL test failed: remote: HTTP Basic: Access denied<br/>Authentication failed for 'https://gitlab.com/AndreyFomenko/drupal-moto-theme.git/'
2019-05-08 17:49:48,908 [28200776] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 58 ms

 

0
Comment actions Permalink

At the same time, git remote and git push through the console work without any problems.

http://prntscr.com/nm1y17

0

Please sign in to leave a comment.