Publishing error: could not read Username


#1

Hello!
I wanted to get familiar with Atom packages, but when I try to publish, I get the following error:

Preparing and tagging a new version done
Pushing v0.2.0 tag failed
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error

The command is executed from the packages root directory.
I’m using GitHub Desktop on a Windows machine and Two-factor authentication.

Application versions:

apm  1.0.4
npm  2.13.3
node 0.10.40
python
git 2.5.1.windows.1
visual studio

I tried almost everything but can’t get the tagging right…
Thank you!


#2

Have you done apm login?


#3

Yes, I did. Also I tried to unpublish a package, but got :

Unpublishing spk-ap failed
Unpublishing failed: Unauthorized

I tried to remove 2 factor auth from my git account, but the error remains


#4

Unauthorized is usually due to:

  1. Deleting and recreating the GitHub repository after publishing
  2. Having the wrong repository information in package.json

I use two-factor authentication and have no issues with publishing, unpublishing, etc.


#6

I’m having the exact same issue now, only with slightly different command output.

> apm publish patch
The system cannot find the path specified.
Preparing and tagging a new version done
Pushing v0.2.1 tag failed
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': Invalid argument

Are there any fixes for this?
I have the Windows Subsystem for Linux installed if that makes any difference.


#7

Try using the Windows command prompt rather than WSL and see if that makes a difference.


#8

This is from a standard Windows cmd sadly.
Bash is still in the PATH though (since it’s in system32), and looks like it’s being called by something in apm.


#9

Have you done apm login?


#10

Yes, and it seems to save the token fine, but still gives these errors when trying to publish.


Failed to Publish Package: "could not read Username for 'https://github.com': Invalid argument"
#11

Can you share where your package is stored so we can take a look at it?


#12

Managed to get it working by publishing from my Mac instead. Thanks anyways.


#13

can you lend me your mac then?

Linking a more recent conversation on what looks like a similar topic: Failed to Publish Package: "could not read Username for 'https://github.com': Invalid argument"