Yaoandw

世界真奇妙

Yaoandw is programmer with java(back) and iOS(front) skills


开始浏览

多个github账号提交问题

此方法是基于ssh方式的,https方式还没有尝试成功

创建ssh key

ssh-keygen -t rsa -C "your-email-address"

将文件保存为id_rsa_COMPANY的格式,并保存到~/.ssh/id_rsa_COMPANY

把新的key加入到github上

访问github,https://github.com/settings/keys,创建一个new ssh key,将id_rsa_COMPANY.pub的内容复制上去.

返回终端,输入ssh-add ~/.ssh/id_rsa_COMPANY

创建一个配置文件

touch ~/.ssh/config
vim config

输入

#Default GitHub
Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa

Host github-COMPANY
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa_COMPANY

修改仓库地址

git remote set-url origin git@github-COMPANY:Company/testing.git

这样就会通过github-COMPANY来找到config文件中对应的仓库

ref

https://code.tutsplus.com/tutorials/quick-tip-how-to-work-with-github-and-multiple-accounts–net-22574

最近的文章

直接在文件系统中将文件加入owncloud

#到occ命令目录cd /home/wwwroot/default/owncloud#www是用户sudo -u www php occ files:scan --all更多命令可以参考https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/occ_command.html#file-operations-label…

other继续阅读
更早的文章

在GitHub上搭建个人博客

创建项目按照github pages页面的指引创建项目搭建本地环境jekyll依赖ruby环境安装完ruby环境后执行# Install Jekyll and Bundler gems through RubyGemsgem install jekyll bundler将github上的博客项目clone到本地git clone https://github.com/yaoandw/yaoandw.github.io.git下载模板下载地址: vno-jekyll下载完解压后把内容复制到项...…

other继续阅读