V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
chlotte
V2EX  ›  问与答

capistrano 部署时出现 fatal: could not read Username for 'https://github.com': No such device or address

  •  1
     
  •   chlotte · 2015-04-21 09:24:02 +08:00 · 2642 次点击
    这是一个创建于 3344 天前的主题,其中的信息可能已经有所发展或是发生改变。
    主要是从192.168.1.10机器远程获取github.com chlotte库(chlotte库为付费私人仓库),然后通过capistrano部署到192.168.1.50机器的/home/work/local目录;

    遇到2个问题,请有经验的同学指导,谢谢!
    1,capistrano deploy.rb 配置中已写明github账号与密码,执行cap deploy:update 时还需要输入github账号与密码;
    2,执行cap deploy:update 时报错:fatal: could not read Username for 'https://github.com': No such device or address;

    capistrano deploy.rb 配置:
    [email protected]:/root/config$ cat deploy.rb
    set :application, "chlotte"
    set :repository,  "https://github.com/chlotte/chlotte.git"
    set :scm_username, "chlotte"
    set :scm_password, "Chlotte0927"


    set :scm, :git
    set :deploy_to, "/home/work/local"
    set :normalize_asset_timestamps, false
    # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`

    role :web, "192.168.1.50"                          # Your HTTP server, Apache/etc
    role :app, "192.168.1.50"                          # This may be the same as your `Web` server
    role :db,  "192.168.1.50", :primary => true # This is where Rails migrations will run
    role :db,  "192.168.1.50"

    # if you're still using the script/reaper helper you will need
    # these http://github.com/rails/irs_process_scripts

    # If you are using Passenger mod_rails uncomment this:
    # namespace :deploy do
    #   task :start do ; end
    #   task :stop do ; end
    #   task :restart, :roles => :app, :except => { :no_release => true } do
    #     run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
    #   end
    # end
    [email protected]:/root/config$ 


    [email protected]:/root/config$ cap deploy:setup
    [email protected]:/root/config$ cap deploy:check
    [email protected]:/root/config$ cap deploy:update
      * executing `deploy:update'
     ** transaction: start
      * executing `deploy:update_code'
        executing locally: "git ls-remote https://github.com/chlotte/chlotte.git HEAD"
    Username for 'https://github.com': chlotte
    Password for 'https://[email protected]': 
        command finished in 10703ms
      * executing "git clone -q  https://github.com/chlotte/chlotte.git /home/work/local/releases/20150420033712 && cd /home/work/local/releases/20150420033712 && git checkout -q -b deploy f9e174f555bc75d9b767ed4a8202622cc5cf9fe8 && (echo f9e174f555bc75d9b767ed4a8202622cc5cf9fe8 > /home/work/local/releases/20150420033712/REVISION)"
        servers: ["192.168.1.50"]
        [192.168.1.50] executing command
     ** [192.168.1.50 :: err] fatal: could not read Username for 'https://github.com': No such device or address
        command finished in 2107ms
    *** [deploy:update_code] rolling back
      * executing "rm -rf /home/work/local/releases/20150420033712; true"
        servers: ["192.168.1.50"]
        [192.168.1.50] executing command
        command finished in 12ms
    failed: "sh -c 'git clone -q  https://github.com/chlotte/chlotte.git /home/work/local/releases/20150420033712 && cd /home/work/local/releases/20150420033712 && git checkout -q -b deploy f9e174f555bc75d9b767ed4a8202622cc5cf9fe8 && (echo f9e174f555bc75d9b767ed4a8202622cc5cf9fe8 > /home/work/local/releases/20150420033712/REVISION)'" on 192.168.1.50
    [email protected]:/root/config$
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   914 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 22:11 · PVG 06:11 · LAX 15:11 · JFK 18:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.