Hub: No /proc/sys/kernel/hostname on Bash on Ubuntu on Windows

Created on 29 Jul 2016  路  5Comments  路  Source: github/hub

On Bash on Ubuntu on Windows (i.e. Windows Subsystem for Linux), I'm unable to use Hub because it tries to access /proc/sys/kernel/hostname which sadly doesn't exist (there's a /bin/hostname, but dunno if that helps).

Doing an operation like e.g. hub issues and attempting to log in results in:

open /proc/sys/kernel/hostname: no such file or directory

Steps to repro:

1) Install WSL on Windows 10 RS1 (aka Anniversary Update)
2) Do

sudo add-apt-repository ppa:cpick/hub
sudo apt-get update
sudo apt-get install hub

3) Run hub clone or hub issues or some other command that brings up the login screen
4) Log in
5) See the error

Related: https://github.com/Microsoft/BashOnWindows/issues/562

Most helpful comment

I guess we could make the hostname lookup non-fatal if it fails? The hostname is only used to name your Personal Access token like hub for [email protected]. Would the OS name be an acceptable fallback? E.g. "hub for Windows", "hub for OS X", etc.

All 5 comments

Thanks for reporting! Which hub version is installed from cpick/hub?

git version 1.9.1
hub version 2.2.1

same here with:

git version 1.9.1
hub version 2.2.4

I guess we could make the hostname lookup non-fatal if it fails? The hostname is only used to name your Personal Access token like hub for [email protected]. Would the OS name be an acceptable fallback? E.g. "hub for Windows", "hub for OS X", etc.

This has been fixed in BashOnWindows itself. Closing the issue. https://github.com/Microsoft/BashOnWindows/issues/562

Was this page helpful?
0 / 5 - 0 ratings