Upload dan cloning folder ke github pada mac os
Masuk terminal
Cara melakukan upload file git
A. Pada Windows
~ git init
~ git add .
~ git commit -m “namabebas”
~ git status
~ git remote add origin diikuti url repo github ,
Contoh: git remote add origin https://github.com/didikprabowo/html-list.git
~ git push -u origin masterB. Pada Mac OS
1) Tahap awal menggunakan SSH yang ada pada github
sudo su
sh-3.2# cd /Applications/XAMPP/htdocs
sh-3.2# ssh-keygen -t ed25519 -C "your_email@example.com"
sh-3.2# ssh-keygen -t ed25519 -C "semzthespider@gmail.com"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/var/root/.ssh/id_ed25519):
/var/root/.ssh/id_ed25519 already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /var/root/.ssh/id_ed25519.
Your public key has been saved in /var/root/.ssh/id_ed25519.pub.
The key fingerprint is:
SHA256:4tgsjOibKZEWefzLIIPgWww19tv3r7uRHbO31CUNDWQ semzthespider@gmail.com
The key's randomart image is:
+--[ED25519 256]--+
| .E |
| + . o |
| = o . .|
|.+ o . o |
|+.= . + S o. o|
|+* * B o . o +.o|
|o.* * = . .o o o.|
|o.o + .. o .|
|.=. +=. . |
+----[SHA256]-----+
sh-3.2# eval "$(ssh-agent -s)"
Agent pid 11839
sh-3.2# nano ~/.ssh/config
sh-3.2# ssh-add -K ~/.ssh/id_ed25519
Identity added: /var/root/.ssh/id_ed25519 (semzthespider@gmail.com)
sh-3.2# pbcopy < ~/.ssh/id_ed25519.pub
sh-3.2#

sh-3.2# git clone git@github.com:semzthespider/SIPTK_Asing.git
Cloning into 'SIPTK_Asing'...
The authenticity of host 'github.com (13.250.177.223)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,13.250.177.223' (RSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
sh-3.2#
2) Tahap kedua setelah masuk reposetory lakukan upload data
sh-3.2# cd /Applications/XAMPP/htdocs/tka-jakon
sh-3.2# git init .
Reinitialized existing Git repository in /Applications/XAMPP/xamppfiles/htdocs/tka-jakon/.git/
sh-3.2# git add .
sh-3.2# git commit -a -m "comit here"
[main 39f42c3] comit here
2728 files changed, 391219 insertions(+)
create mode 100644 .DS_Store
create mode 100644 application/.DS_Store
create mode 100755 application/.htaccess
create mode 100755 application/cache/index.html
create mode 100755 application/config/autoload.php
create mode 100755 application/config/config.php
create mode 100755 application/config/constants.php
create mode 100755 system/libraries/Xmlrpc.php
create mode 100755 system/libraries/Xmlrpcs.php
create mode 100755 system/libraries/Zip.php
create mode 100755 system/libraries/index.html
create mode 100644 tk_asing.sql
sh-3.2# git push
Enumerating objects: 3003, done.
Counting objects: 100% (3003/3003), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2974/2974), done.
Writing objects: 100% (3002/3002), 9.06 MiB | 1.62 MiB/s, done.
Total 3002 (delta 561), reused 0 (delta 0)
remote: Resolving deltas: 100% (561/561), done.
To https://github.com/LPJKN/tka-jakon.git
cf1cd08..39f42c3 main -> main
sh-3.2# git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
sh-3.2#
Referensi :
https://gist.github.com/albatrocity/1201187
https://kodingin.com/cara-upload-project-ke-github/
https://www.youtube.com/watch?v=nZYJKXXMvkM
https://www.tutsmake.com/upload-project-files-on-github-using-command-line/
https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent




Komentar
Posting Komentar