github帐号申请和使用教程
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了github帐号申请和使用教程相关的知识,希望对你有一定的参考价值。
1、打开github官网进行注册(有可能会少一两张截图),如下图:
2、新建项目,如下图:
3、创建完成后,简单使用说明,如下图:
4、在客户端上执行如下命令,将生产的公钥信息粘贴到github SSH key中,并测试能否连接成功。如下图:
[[email protected] ~] ssh-keygen -t rsa -C "[email protected]" [[email protected] ~] cat /root/.ssh/id_rsa.pub [[email protected] ~] ssh -T [email protected] The authenticity of host 'github.com (13.229.188.59)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,13.229.188.59' (RSA) to the list of known hosts. Hi net881004! You've successfully authenticated, but GitHub does not provide shell access.
5、git使用步骤
[[email protected] ~]# git config --global user.name "gxm" [[email protected] ~]# git config --global user.email "[email protected]" [[email protected] ~]# mkdir gxmscript [[email protected] ~]# cd gxmscript [[email protected] gxmscript]# echo "# sailikung" >> README.md [[email protected] gxmscript]# git init [[email protected] gxmscript]# git add README.md [[email protected] gxmscript]# git commit -m "first commit" [[email protected] gxmscript]# git remote add origin [email protected]:net881004/sailikung.git [[email protected] gxmscript]# git push -u origin master Warning: Permanently added the RSA host key for IP address '52.74.223.119' to the list of known hosts. Counting objects: 3, done. Writing objects: 100% (3/3), 213 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To [email protected]:net881004/sailikung.git * [new branch] master -> master Branch master set up to track remote branch master from origin. [[email protected] gxmscript]# git pull origin master [[email protected] gxmscript]# git pull origin master From github.com:net881004/sailikung * branch master -> FETCH_HEAD Already up-to-date. [[email protected] gxmscript]# 新建文件(我rz上传了我之前写的一些脚本) [[email protected] gxmscript]# git status # On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # bak_log.sh # check_os.sh # check_pid_autostart.sh # dspam_install.sh # fail2b_install.sh # for-inbox_to-other.sh # heartbeat_drbd_monitor.sh # imapmail.sh # mysql_manage.sh # mysqlclear_dirtydata.sh # restoremail.sh # samba_install.sh # search_restore_maildata.sh # service_montir.sh # win_to_lin_maildata.sh nothing added to commit but untracked files present (use "git add" to track) [[email protected] gxmscript]# git add * [[email protected] gxmscript]# git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: bak_log.sh # new file: check_os.sh # new file: check_pid_autostart.sh # new file: dspam_install.sh # new file: fail2b_install.sh # new file: for-inbox_to-other.sh # new file: heartbeat_drbd_monitor.sh # new file: imapmail.sh # new file: mysql_manage.sh # new file: mysqlclear_dirtydata.sh # new file: restoremail.sh # new file: samba_install.sh # new file: search_restore_maildata.sh # new file: service_montir.sh # new file: win_to_lin_maildata.sh # [[email protected] gxmscript]# git commit -m "upload sh" [master f68abfd] upload sh 15 files changed, 1784 insertions(+), 0 deletions(-) create mode 100644 bak_log.sh create mode 100644 check_os.sh create mode 100644 check_pid_autostart.sh create mode 100644 dspam_install.sh create mode 100644 fail2b_install.sh create mode 100644 for-inbox_to-other.sh create mode 100644 heartbeat_drbd_monitor.sh create mode 100644 imapmail.sh create mode 100644 mysql_manage.sh create mode 100644 mysqlclear_dirtydata.sh create mode 100644 restoremail.sh create mode 100644 samba_install.sh create mode 100644 search_restore_maildata.sh create mode 100644 service_montir.sh create mode 100644 win_to_lin_maildata.sh [[email protected] gxmscript]# git status # On branch master # Your branch is ahead of 'origin/master' by 1 commit. # nothing to commit (working directory clean) [[email protected] gxmscript]# git log commit f68abfdaec8b6130380f15c2ed82eb36866dde24 Author: gxm <[email protected]> Date: Sun May 20 22:49:26 2018 +0800 upload sh commit 80757952c28478f575f89551ff6208d3cbd9741b Author: gxm <[email protected]> Date: Sun May 20 22:40:54 2018 +0800 first commit [[email protected] gxmscript]# git push origin master Counting objects: 18, done. Compressing objects: 100% (17/17), done. Writing objects: 100% (17/17), 15.68 KiB, done. Total 17 (delta 1), reused 0 (delta 0) remote: Resolving deltas: 100% (1/1), done. To [email protected]:net881004/sailikung.git 8075795..f68abfd master -> master
以上是关于github帐号申请和使用教程的主要内容,如果未能解决你的问题,请参考以下文章