fatal: could not read Password for 'http://username@github.com': No such device or address

10,832 views
Skip to first unread message

Dean Richardson

unread,
Aug 2, 2013, 11:03:30 AM8/2/13
to capis...@googlegroups.com
Hi:

I'm running ruby 1.9.3p392 [i386-mingw32] on windows 7; I'm also running Capistrano v2.15.5.

I've had success deploying an earlier rails app to my production (Ubuntu 12.04) server using cap deploy for many months now.

But my attempt to deploy a new rails app to the same server using cap deploy has raised a number of errors. They all seem to arise when capistrano tries to access my git repository from the production server.


Here's what I'm getting in response to "cap deploy" at the git bash command line on my Windows development machine:

c:\Sites\rails_projects\molex_acq>cap deploy
  * ←[32m2013-08-02 09:52:59 executing `deploy'←[0m
  * ←[32m2013-08-02 09:52:59 executing `deploy:update'←[0m
 ** transaction: start
  * ←[32m2013-08-02 09:52:59 executing `deploy:update_code'←[0m
    updating the cached checkout on all servers
    ←[33mexecuting locally: "git ls-remote http://user...@github.com/username/m
olex_acq.git master"←[0m
Password for 'http://user...@github.com':
    ←[2;37mcommand finished in 30232ms←[0m
  * ←[33mexecuting "if [ -d /home/dean/rails_projects/molex_acq/shared/cached-co
py ]; then cd /home/dean/rails_projects/molex_acq/shared/cached-copy && git fetc
h -q origin && git fetch --tags -q origin && git reset -q --hard dbf5c851f043c14
0678cec5f23b2d0a782b6a509 && git clean -q -d -x -f; else git clone -q -b master
http://user...@github.com/username/molex_acq.git /home/dean/rails_projects/mole
x_acq/shared/cached-copy && cd /home/dean/rails_projects/molex_acq/shared/cached
-copy && git checkout -q -b deploy dbf5c851f043c140678cec5f23b2d0a782b6a509; fi"
←[0m
    servers: ["10.24.5.50"]
    [10.24.5.50] executing command
 ** [10.24.5.50 :: err] fatal: could not read Password for 'http://username@gith
ub.com': No such device or address
Password:
    ←[2;37mcommand finished in 10732ms←[0m
*** [←[34mdeploy:update_code←[0m] ←[34mrolling back←[0m
  * ←[33mexecuting "rm -rf /home/dean/rails_projects/molex_acq/releases/20130802
145342; true"←[0m
    servers: ["10.24.5.50"]
    [10.24.5.50] executing command
    ←[2;37mcommand finished in 22ms←[0m
failed: "sh -c 'if [ -d /home/dean/rails_projects/molex_acq/shared/cached-copy ]
; then cd /home/dean/rails_projects/molex_acq/shared/cached-copy && git fetch -q
 origin && git fetch --tags -q origin && git reset -q --hard dbf5c851f043c140678
cec5f23b2d0a782b6a509 && git clean -q -d -x -f; else git clone -q -b master http
://user...@github.com/username/molex_acq.git /home/dean/rails_projects/molex_ac
q/shared/cached-copy && cd /home/dean/rails_projects/molex_acq/shared/cached-cop
y && git checkout -q -b deploy dbf5c851f043c140678cec5f23b2d0a782b6a509; fi'" on
 10.24.5.50

c:\Sites\rails_projects\molex_acq>

I'm trying to figure out what the "could not read Password for [github address]: No such device or address" error message is telling me and why my deploy doesn't complete successfully as a result. My deploy.rb contains my correct github password, and capistrano prompts me for that password at several locations, and I'm entering that password correctly. I did fiddle with my ssh keys recently in attempting to deploy my new app to heroku, so that's probably where things are going wrong. Any suggestions on how to debug this process?

I'm particularly interested in understanding what exactly capistrano is trying to do at each step so I can attempt to reproduce the process step by step.

Thanks very much,

Dean Richardson
Molex.com

harender singh

unread,
Sep 15, 2013, 11:49:22 AM9/15/13
to capis...@googlegroups.com
I am facing the same error , have you resolved this issue?

Lee Hambley

unread,
Sep 16, 2013, 9:44:47 AM9/16/13
to capistrano
Which Cap version?

--
--
* You received this message because you are subscribed to the Google Groups "Capistrano" group.
* To post to this group, send email to capis...@googlegroups.com
* To unsubscribe from this group, send email to capistrano+...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
---
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Nigel Sheridan-Smith

unread,
Sep 26, 2013, 12:17:49 AM9/26/13
to capis...@googlegroups.com
Could it be that you need to setup the SSH keys? 

I think this might be required for private repositories on GitHub, as a username and password prompt appears on the remote server and Capistrano doesn't appear to handle it correctly.


Cheers,

Nigel

haf...@make-it-digital.net

unread,
Jan 7, 2014, 4:52:27 AM1/7/14
to capis...@googlegroups.com
Hi,

Try to include your username and password in the URL like this:

git clone https://username:password@github.com/projectname.git

Reply all
Reply to author
Forward
0 new messages