class: center, middle # Python ## Przygotowanie do zajęć ### 10/04/2019 Paweł Suder
https://pasuder.github.io/labs/doc/getting-started --- # Agenda 1. Założenie konta na GitHub 1. Uruchomienie edytora 1. `Hello World!` 1. Dodanie klucza SSH 1. Założenie repozytorium --- ## Założenie konta na GitHub - na głównej stronie https://github.com utwórz konto - wybierz plan _Free_ - _Step 3_ pomiń - potwierdź adres email - potrzebne do korzystania z edytora --- class: center, middle
_Założenie konta przez główną stronę_ --- class: center, middle
_Założenie konta przy okazji otwierania edytora_ --- class: center, middle
_Wybór login i hasła oraz podanie emaila_ --- class: center, middle
_Wybór planu Free_ --- ## Uruchomienie edytora - wymagane zalogowane konto na GitHub, z potwierdzonym adresem email - otwórz stronę [edytora](https://editor.suder.dev) - potwierdź logowanie przez konto GitHub - jeśli pojawi się błąd, odśwież stronę [edytora](https://editor.suder.dev) --- class: center, middle  _Weryfikacja emaila_ --- class: center, middle  _Weryfikacja emaila_ --- class: center, middle
_Potwierdzenie weryfikacji_ --- class: center, middle
_Uruchomienie edytora_ --- class: center, middle  _Edytor uruchomiony_ --- ## `Hello World!` - utwórz plik `main.py` - wypełnij plik `main.py` ```python if __name__ == '__main__': print 'Hello World!' ``` - otwórz terminal - wykonaj `python main.py` --- class: center, middle  _Tworzenie nowego pliku_ --- class: center, middle  _Tworzenie nowego pliku_ --- class: center, middle  _Uruchomienie terminala_ --- class: center, middle  _Uruchomienie terminala_ --- ## Dodanie klucza SSH - wykonaj `ssh-keygen` w terminalu - wykonaj `cat ~/.ssh/id_rsa.pub` w terminalu - skopiuj wynik wywołania powyższego polecenia - dodaj klucz przez https://github.com/settings/ssh/new --- class: center, middle  _Wykonanie ssh-keygen_ --- class: center, middle  _Wyświetlenie klucza SSH_ --- class: center, middle  _Skopiowanie klucza SSH_ --- class: center, middle  _Dodanie klucza SSH_ --- class: center, middle  _Klucz SSH dodany_ --- ## Założenie repozytorium - utwórz nowy katalog `testing/` - utwórz nowy plik `README.md` w katalogu `testing/` z zawartością ```bash # testing ``` - skonfiguruj `git` przez terminal ```bash git config --global user.email "TWOJ@ADRES.EMAIL" git config --global user.name "TWOJ LOGIN LUB IMIE" ``` --- ## Założenie repozytorium Wykonaj polecenia przez terminal w katalogu `testing/`: - utwórz repozytorium lokalnie przez `git init` - dodaj plik `README.md` przez `git add README.md` - potwierdź zmianę przez `git commit -m "First commit"` ```bash cd /home/project/testing git init git add README.md git commit -m "First commit" ``` --- ## Założenie repozytorium - załóż repozytorium przez https://github.com/new o nazwie `testing` - ustaw zdalne repozytorium przez terminal ```bash cd /home/project/testing git remote add origin git@github.com:TWOJ_LOGIN/testing.git git push -u origin master ``` - jeśli dodałeś z `TWOJ_LOGIN`, usuń ustawienie i wykonaj ponownie polecenia z zmienionym `TWOJ_LOGIN` ```bash git remote rm origin ``` --- class: center, middle
_Założenie repozytorium_ --- class: center, middle
_Repozytorium z udostępnioną zmianą_ --- class: center, middle
_Projekt po wykonaniu wszystkich poleceń_ --- class: center, middle ## Do zobaczenia na zajęciach!