-
检查本地是否存在ssh key
ls -al ~/.ssh
如果存在,则会显示信息
或者 cat ~/.ssh/id_ed25519.pub -
生成新的SSH key
ssh-keygen -t ed25519 -C “your_email@example.com”** ed25519 是文件名,该命令会生成id_文件名.pub的文件
-
git 全局设置
git config --global user.name “youremail@qq.com”
git config --global user.email “” -
克隆仓库
git clone https://codeup.aliyun.com/61db90e2f9a895xxxxxxx/My-Demo.git
cd My-Demo
touch README.md
git add README.md
git commit -m “add README”
git push -u origin master -
已有文件夹或者仓库
cd existing_folder
git init
git remote add origin https://codeup.aliyun.com/61db90e2f9a895xxxxxxx/My-Demo.git
git add .
git commit
git push -u origin master -
导入代码库
git clone --bare https://git.example.com/your/project.git your_path
cd your_path
git remote set-url origin https://codeup.aliyun.com/61db90e2f9a895xxxxxxx/Demo.git
git push --mirror
拷贝公钥
windows: clip < ~/.ssh/id_ed25519.pub
Mac: pbcopy < ~/.ssh/id_ed25519.pub
Linux: xclip -sel clip < ~/.ssh/id_ed25519.pub
**
引用自 阿里云帮助中心