Error 302 when trying to do PULL from bitbucket via Intellij ui

Answered

 

My pc is behind a proxy.

iside Intellij's Terminal all git commands work including pull.

In Intellij Proxy settings, proxy is configured and for no_proxy bitbucket server is set.

 

When trying to pull from gui getting:
unable to access 'https://xxxxx@bitbucket.server/xxxxxxx.git/': Received HTTP code 302 from proxy after CONNECT

 

Please assist. 

0
6 comments

In fact, proxy settings of IntelliJ do not affect command line git, and it should behave in accordance with the git config.

What does git config http.proxy says in the terminal?

Also double check the IDE is configured to use the same git executable as in terminal.

0
Avatar
Permanently deleted user

Hi  and thanks for the reply.

 git config http.proxy:

http://myproxyhost:8080



How to check the executable part?

 

0
Avatar
Permanently deleted user

update, sometime  terminal also doesn't work and shows same error, but then I do:
set no_proxy=<bitbuckethost>

and then terminal works again

0

You have http.proxy set in git config. That means ALL http connections from git go through the configured proxy. Including the commands executed in a terminal.

You need to change this config to make sure it does not send connectiosn to your bitbucket hoist via proxy. See e.g. https://stackoverflow.com/a/41623825/7523979

> set no_proxy=<bitbuckethost>

Environment variables are inherited from the parent process. Setting NO_PROXY variable in terminal does not affect IDE instance that is already running, and respectively git started by IDE does not have the NO_PROXY variable in its environment. Thus the connection goes through proxy

So, another way is to configure NO_PROXY in the OS settings, and then restart IDE (and Toolbox App if you use it) to make sure the NO_PROXY variable is inherited.

> How to check the executable part?

The executable to use is specified in Settings | Version Control | Git. The issue, however, is in http.proxy config.

0
Avatar
Permanently deleted user

> to configure NO_PROXY in the OS settings, and then restart IDE<

Thank you! this worked!

But why setting this option in Intellij's Settings Proxy tab (there is a text box 'No proxy for') doesn't work?

0

> But why setting this option in Intellij's Settings Proxy tab

IntelliJ uses command line git - so separate git processes are started which do not know about the settings within the IDE. Vote for https://youtrack.jetbrains.com/issue/IDEA-102844

0

Please sign in to leave a comment.