You get this error ( fatal: could not read Username for 'https://github.com': Device not configured) when gityou need to request a username or password, and (a) the only mechanism available to him is to ask on the console and (b) there is no console available (git is not connected to the tty device, i.e. you do not start gitinteractively).
This usually happens in an environment where you invoke git from some gui tool and the corresponding credential assistant is not configured.
There are many ways to solve this problem: