gitsublimetext3sublime-text-plugin

Fatal: could not read username for 'https //github.com' device not configured


I am trying to push code to github with SublimeGit plugin, but something weird occurs to me.

Pushing to https://github.com/username/username.github.io.git

fatal: could not read Username for 'https://github.com': Device not configured

Have been taken a lot of search before asking, like fatal: could not read Username for 'https://github.com': No such file or directory, Fatal: could not read Username for 'https://github.com': No such device or address.

But problem still remains, any effort will be appreciated.


Solution

  • You get that error (fatal: could not read Username for 'https://github.com': Device not configured) when git needs to ask for a username or password and (a) the only mechanism available to it is to ask on the console and (b) there is no console available (git is not attached to a tty device, i.e., you're not running git interactively).

    This commonly happens in an environment where you are invoking git from some sort of gui tool and no appropriate credentials helper has been configured.

    There are a variety of ways of addressing this problem: