本来 vagrant homestead 用的好好的。
但是我需要 虚拟机中 docker 使用 虚拟机的 ssh
所以就为 docker 只读挂载了主机的 ~/.ssh 到 容器的 ~/.ssh
结果连接失败。
因为需要输入密钥密码。
所以就想重置密钥对
结果就造成了 homestead ssh 都连接失败。
| 当使用源错误时处理, | |
| ``` | |
| yum remove epel-release | |
| rm -rf /var/cache/yum/x86_64/6/epel/* | |
| yum clean all | |
| # 重新安装6的源 | |
| rpm -Uvh http://mirrors.ustc.edu.cn/epel/epel-release-latest-6.noarch.rpm | |
| rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm |
本来 vagrant homestead 用的好好的。
但是我需要 虚拟机中 docker 使用 虚拟机的 ssh
所以就为 docker 只读挂载了主机的 ~/.ssh 到 容器的 ~/.ssh
结果连接失败。
因为需要输入密钥密码。
所以就想重置密钥对
结果就造成了 homestead ssh 都连接失败。
-- 关闭 dock 图标提醒:
defaults write com.apple.dock no-bouncing -bool FALSE
killall Dock
-- 关闭 dock 图标提醒 defaults write com.apple.dock no-bouncing -bool FALSE killall Dock
| # Select image from https://hub.docker.com/_/php/ | |
| image: ci/ci | |
| # Select what we should cache between builds | |
| cache: | |
| key: ${CI_PROJECT_ID} | |
| paths: | |
| - vendor/ | |
| - composer.lock.prev | |
| - .env |
# composer install 以 composer.lock 为依据
# 存在 composer.lock 时,手动修改 composer.json 之后
# 1. 重新 composer install 会产生警告 并不会更新依赖 (⚠️:Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.)
# 2. composer update 则会重新加载依赖并重新生成 composer.lock 文件
# 指定为开发所需要的依赖 生产环境不需要的依赖
composer require --dev
// ssh 不会自动遍历目录下的密钥进行配对(不安全),只会默认提供 id_rsa.pub 公钥
// 所以需要针对指定 Host 提供指定密钥的话 就需要添加配置
// 配置方法
1. 创建 ~/.ssh/config 文件
2. 写入如下字段:
# gitlab
Host gitlab.hs.app
HostName gitlab.hs.app
User git
Change npm's default directory to another directory
There are times when you do not want to change ownership of the default directory that npm uses (i.e. /usr) as this could cause some problems, for example if you are sharing the system with other users. Instead, you can configure npm to use a different directory altogether. In our case, this will be a hidden directory in our home folder.