Repository navigation
Description
Description
When behind my corporate proxy, GitHub Desktop works fine for pulling/pushing repositories that already exist both on GitHub and my local machine. However, if I create a new repository on my local machine I cannot publish it to GitHub, and if I create a new repository on GitHub I cannot clone it to my local machine.
In each case I get an error message related to api.github.com, so it looks like perhaps normal Git operations are properly respecting the http_proxy and https_proxy environment variables I have set but GitHub API calls are not. (If I connect the same machine to a different network such as my phone's hotspot and remove the http_proxy and https_proxy environment variables, everything works fine.)
Version
GitHub Desktop version: 0.6.1
OS version: Microsoft Windows [Version 10.0.14393]
Steps to Reproduce
- Create a new local repository using GitHub Desktop
- Attempt to publish to GitHub
Expected behaviour: Repository successfully published
Actual behaviour: ECONNREFUSED error message related to api.github.com
Reproduces how often: 100%
Logs
2017-06-13T22:48:02.172Z - error: [ui] Unable to deserialize JSON string to object request to https://api.github.com/user/repos failed, reason: connect ECONNREFUSED 192.30.253.117:443
SyntaxError: Unexpected token r in JSON at position 0
at JSON.parse (<anonymous>)
at Object.<anonymous> (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\src\lib\http.ts:18:36)
at Generator.next (<anonymous>)
at C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\src\lib\http.ts:63:2
at U (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\src\lib\http.ts:63:2)
at Object.I.deserialize (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\src\lib\http.ts:12:65)
at I.API.<anonymous> (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\src\lib\api.ts:324:6)
at Generator.throw (<anonymous>)
at Pe (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\src\lib\api.ts:654:2)
at process._tickCallback (internal/process/next_tick.js:103:7)
2017-06-13T22:48:02.174Z - error: [ui] createRepository return an unknown error
L: request to https://api.github.com/user/repos failed, reason: connect ECONNREFUSED 192.30.253.117:443
at ClientRequest.<anonymous> (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\~\node-fetch\index.js:133:1)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:309:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1281:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
2017-06-13T22:48:22.398Z - error: [ui] fetchRepository: not found for 'ianmackenzie' and 'ianmackenzie/ianmackenzie.github.io'
L: request to https://api.github.com/repos/ianmackenzie/ianmackenzie.github.io failed, reason: connect ECONNREFUSED 192.30.253.116:443
at ClientRequest.<anonymous> (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\~\node-fetch\index.js:133:1)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:309:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1281:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
2017-06-13T22:48:28.892Z - error: [ui] Unable to deserialize JSON string to object request to https://api.github.com/user/repos failed, reason: connect ECONNREFUSED 192.30.253.116:443
SyntaxError: Unexpected token r in JSON at position 0
at JSON.parse (<anonymous>)
at Object.<anonymous> (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\src\lib\http.ts:18:36)
at Generator.next (<anonymous>)
at C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\src\lib\http.ts:63:2
at U (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\src\lib\http.ts:63:2)
at Object.I.deserialize (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\src\lib\http.ts:12:65)
at I.API.<anonymous> (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\src\lib\api.ts:324:6)
at Generator.throw (<anonymous>)
at Pe (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\src\lib\api.ts:654:2)
at process._tickCallback (internal/process/next_tick.js:103:7)
2017-06-13T22:48:28.893Z - error: [ui] createRepository return an unknown error
L: request to https://api.github.com/user/repos failed, reason: connect ECONNREFUSED 192.30.253.116:443
at ClientRequest.<anonymous> (C:\Users\ian.mackenzie\AppData\Local\GitHubDesktop\app-0.6.1\webpack:\app\~\node-fetch\index.js:133:1)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:309:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1281:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

Activity
shiftkey commentedon Jun 14, 2017
These calls should be using the system proxy settings of Windows, which are separate to the
http_proxyandhttps_proxyenvironment variables that Git looks for.This stack trace here suggests we're using
node-fetchin octokat, rather than the nativewindow.fetchAPI that's available in the renderer for Electron.joshaber commentedon Jun 29, 2017
We made some pretty big changes to how API requests are done in 0.6.2, such that it should pick up your system level network settings.
I'm gonna roll this into #2054. Feel free to follow along over there.
ianmackenzie commentedon Jun 29, 2017
Just tried pushing and pulling some new repositories using 0.6.2 and everything seems to work now - thanks!