I have always put off creating a github repository because of the learning curve. Now I know I was right! I want to set up a public repository to make available some code for using lewansoul servos. I tried using this guide, but I soon started to get error messages.
I started with:
git config --global user.name "fredbloggs"
git config --global user.email "[email protected]"
git config --global color.ui true
git config --global core.editor geany
I also set up ssh authentication successfully:
ssh -T git@Hi fredbloggs!
You've successfully authenticated, but GitHub does not provide shell access.
Then I went into my project directory and tried to set up the repository. I managed to resolve the following jargon-rich errors:
fatal: No configured push destination.
fatal: The current branch master has no upstream branch.
ERROR: Repository not found.
I had to create the repository in github first, and then I used the following commands:
cd lewansoul-lx16s
git init
git add lx16a.h main.py newlx16a.c README.md .gitignore
git commit -m "Initial commit"
git branch -M master
git remote add origin [email protected]:fredbloggs/lewansoul-lx16a.git
git push -u origin master
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 12 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 5.57 KiB | 5.57 MiB/s, done.
Total 7 (delta 0), reused 0 (delta 0), pack-reused 0
remote: error: GH007: Your push would publish a private email address.
remote: You can make your email public or disable this protection by visiting:
remote: http://github.com/settings/emails
To github.com:fredbloggs/lewansoul-lx16a.git
! [remote rejected] master -> master (push declined due to email privacy restrictions)
error: failed to push some refs to 'github.com:fredbloggs/lewansoul-lx16a.git'
The final error has me stumped. I don’t want to publicise my email address, so I followed some advice to set a virtual email and ran:
git config –global user.email “[email protected]”
…but this does not resolve the error. What should I do now?
I’d also really appreciate a guide to setting up a simple, public repository that actually works.
2