migrate to git.charlotte.sh
This commit is contained in:
commit
fbd588721e
412 changed files with 13750 additions and 0 deletions
1
automation-sys320/week01/firstfile.ps1
Normal file
1
automation-sys320/week01/firstfile.ps1
Normal file
|
@ -0,0 +1 @@
|
|||
powershell first file, for testing Git
|
41
automation-sys320/week01/github_setup.md
Normal file
41
automation-sys320/week01/github_setup.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Basic GitHub commands
|
||||
- Clone repo Using SSH: `git clone git@github.com:charlottecroce/SYS320.git`
|
||||
- Clone repo Using HTPS: `git clone https://github.com/charlottecroce/SYS320.git`
|
||||
- Add file to staging area: `git add <file>`
|
||||
- Commit change: `git commit -m "commit message"`
|
||||
- ID needed to commit: `git config --global user.name "charlottecroce"`
|
||||
- ID needed to commit: `git config --global user.email "charlotte.croce@mymail.champlain.edu"`
|
||||
- Push changes to repo: `git push`
|
||||
|
||||
- `git remote -v`
|
||||
- if git is using https and not authenticating. you might have to change it to use ssh
|
||||
- `git remote set-url origin git@github.com:charlottecroce/champlaintechjournals`
|
||||
|
||||
# Ubuntu Setup
|
||||
Install Git
|
||||
- `apt-get update`
|
||||
- `apt-get install git`
|
||||
|
||||
Create SSH key
|
||||
- `sudu su`
|
||||
- `ssh-keygen -t rsa -b 4096 -C "charlotte.croce@mymail.champlain.edu"`
|
||||
- `ssh-add /root/.ssh/id_rsa`
|
||||
- Check if SSH agent is running:`eval "$(ssh-agent -s)"`
|
||||
|
||||
Add key to GitHub account
|
||||
- `cat /root/.ssh/id_rsa.pub` -> copy
|
||||
- GitHub -> Settings -> SSH and GPG Keys -> New SSH Key -> Select Authentication Key
|
||||
- Test Connection: `ssh -T git@github.com`
|
||||
|
||||
# Windows Setup
|
||||
Install Git
|
||||
- Download Git from https://git-scm.com/download/win
|
||||
- I select nano as default editory
|
||||
|
||||
|
||||
Windows Token Authentication
|
||||
- When attempting a `git push` you will have an authentication window pop up. We will use token authentication
|
||||
- Github - Settings - Developer Settings - Tokens(Classic) - Generate a personal access token
|
||||
- Select the following fields in Scope: repo, write:packages, admin:org, admin:public_key, admin:repo_hook
|
||||
- Control Panel -> Manage Windows Credentials -> Create Generic Credential -> add GitHub.com:username:password
|
||||
- Copy the token into the field on the popup and you should be authenticated to push
|
Loading…
Add table
Add a link
Reference in a new issue