-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub
More file actions
17 lines (15 loc) · 654 Bytes
/
github
File metadata and controls
17 lines (15 loc) · 654 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 191114
# Create new GitHub repo in shell
# https://stackoverflow.com/questions/2423777/is-it-possible-to-create-a-remote-repo-on-github-from-the-cli-without-opening-br
curl -u 'USER@gmail.com' https://api.github.com/user/repos -d '{"name":"REPO"}'
git remote add origin https://github.com:USER/REPO.git # USERNAME not mail
git push origin master
# problem: can not push:
git push origin my-branch
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
# fix:
# use https instead of ssh
git remote set-url origin https://github.com/USERNAME/REPOSITORY
# if that not works:
git push --set-upstream origin master