Last login: Tue Feb 2 21:54:24 on ttys000
chenyazhengs-MacBook-Pro:~ chenyazheng$ ssh-keygen -t rsa -C “zhengzheng0922@126.com”
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/chenyazheng/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/chenyazheng/.ssh/id_rsa.
Your public key has been saved in /Users/chenyazheng/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:uLZWDPMOr0kgF0TPWOMcgFOoMBBlbF3J9S8dTpfbzC0 ——–@126.com
The key’s randomart image is:
+—[RSA 2048]—-+
….
….
+—-[SHA256]—–+
chenyazhengs-MacBook-Pro:~ chenyazheng$ ls -a
.ssh Desktop ...
chenyazhengs-MacBook-Pro:~ chenyazheng$ cd .ssh
chenyazhengs-MacBook-Pro:.ssh chenyazheng$ ls
id_rsa id_rsa.pub known_hosts
chenyazhengs-MacBook-Pro:.ssh chenyazheng$ vim id_rsa.pub
chenyazhengs-MacBook-Pro:.ssh chenyazheng$ ssh -T git@github.com
Warning: Permanently added the RSA host key for IP address ‘—.–.–.–’ to the list of known hosts.
Hi chenmanman! You’ve successfully authenticated, but GitHub does not provide shell access.
chenyazhengs-MacBook-Pro:.ssh chenyazheng$ git clone git@github.com:chenmanman/test01.git
Cloning into ‘test01’…
Warning: Permanently added the RSA host key for IP address ‘192.30.252.128’ to the list of known hosts.
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), done.
Checking connectivity… done.
chenyazhengs-MacBook-Pro:.ssh chenyazheng$ ls
id_rsa id_rsa.pub known_hosts test01
chenyazhengs-MacBook-Pro:.ssh chenyazheng$ git status
fatal: Not a git repository (or any of the parent directories): .git
chenyazhengs-MacBook-Pro:.ssh chenyazheng$ cd test01
chenyazhengs-MacBook-Pro:test01 chenyazheng$ git status
On branch master
Your branch is up-to-date with ‘origin/master’.
nothing to commit, working directory clean
chenyazhengs-MacBook-Pro:test01 chenyazheng$ vim 1.txt
chenyazhengs-MacBook-Pro:test01 chenyazheng$ ls
1.txt README.md
chenyazhengs-MacBook-Pro:test01 chenyazheng$ git status
On branch master
Your branch is up-to-date with ‘origin/master’.
Untracked files:
(use “git add
1.txt
nothing added to commit but untracked files present (use “git add” to track)
chenyazhengs-MacBook-Pro:test01 chenyazheng$ git add 1.txt
chenyazhengs-MacBook-Pro:test01 chenyazheng$ git commit -m “first commit”
[master bf56b2f] first commit
Committer: chenyazheng < chenyazheng@chenyazhengs-MacBook-Pro.local >
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:
git config --global --edit
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1 file changed, 1 insertion(+)
create mode 100644 1.txt
chenyazhengs-MacBook-Pro:test01 chenyazheng$ git status
On branch master
Your branch is ahead of ‘origin/master’ by 1 commit.
(use “git push” to publish your local commits)
nothing to commit, working directory clean
chenyazhengs-MacBook-Pro:test01 chenyazheng$ git push
warning: push.default is unset; its implicit value has changed in
Git 2.0 from ‘matching’ to ‘simple’. To squelch this message
and maintain the traditional behavior, use:
git config –global push.default matching
To squelch this message and adopt the new behavior now, use:
git config –global push.default simple
When push.default is set to ‘matching’, git will push local branches
to the remote branches that already exist with the same name.
Since Git 2.0, Git defaults to the more conservative ‘simple’
behavior, which only pushes the current branch to the corresponding
remote branch that ‘git pull’ uses to update the current branch.
See ‘git help config’ and search for ‘push.default’ for further information.
(the ‘simple’ mode was introduced in Git 1.7.11. Use the similar mode
‘current’ instead of ‘simple’ if you sometimes use older versions of Git)
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 313 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:chenmanman/test01.git
e6ef9e2..bf56b2f master -> master
chenyazhengs-MacBook-Pro:test01 chenyazheng$
|——————————————mysql 修改密码 ————————————–|
mysql -u root -p
SET PASSWORD=PASSWORD(‘123456’);
ALTER USER ‘root’@’localhost’ PASSWORD EXPIRE NEVER;
flush privileges;