当前位置:   article > 正文

ssh 建立github验证_云服务的创建github验证应用

云服务的创建github验证应用
建立ssh无验证连接
Check for SSH keys、
cd ~/.ssh
ls
Check the directory listing to see if you have a file named either id_rsa.pub or id_dsa.pub
检查有无产生过的key,一台机器只能创建一个。如果重新创建则前一个会被覆盖。
Generate a new SSH key
ssh-keygen -t rsa -C "your_email@example.com"# Creates a new ssh key, using the provided email as a label
这里的邮箱只是一个标识你可以随便取。对产生密钥没有影响。
增加密钥到远程仓库
~/.ssh/id_rsa.pub将这里的内容增加到远程ssh仓库中。


Download and Install Git
sudo apt-get install git


configure your settings
git config --global user.name "Your Name Here"# Sets the default name for git to use when you commit
git config --global user.email "your_email@example.com"# Sets the default email for git to use when you commit


创建一个仓库在github或者gitlab等网站上:
cd进入项目的根目录下
git init# Sets up the necessary Git files
git add .#adding it to the list of files to be committed
git commit -m 'first commit'# Commits your files, adding the message "first commit"


Push your commit
git remote add origin https://github.com/username/Hello-World.git# Creates a remote named "origin" pointing at your GitHub repository
git push origin master# Sends your commits in the "master" branch to GitHub


fork project#自己想帮助别人的项目,或想用别人的项目作为自己的起点。
先要ssh建立连接,见上面
然后git clone https://github.com/username/Spoon-Knife.git#不管是github还是gitlab都可以。git通用
Create branch with your feature
git checkout -b $feature_name
Write code. Commit changes
git commit -am "My feature is ready"
Push your branch to GitLab
git push origin $feature_name
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小舞很执着/article/detail/842611
推荐阅读
相关标签
  

闽ICP备14008679号