PLEASE SCROLL DOWN AND READ THE COMMENTS FOR A MORE UP TO DATE WAY (AND EASIER) TO DO THIS
When using Homebrew (http://brew.sh) and searching formulas or pull requests you may get the dreaded error message: Github API Rate limit exceeded
Let's fix that! (yeah!)
PLEASE SCROLL DOWN AND READ THE COMMENTS FOR A MORE UP TO DATE WAY (AND EASIER) TO DO THIS
Create a new Personal Token in your Github Account Settings (Sidebar: Applications) and then copy the Token.
In the Terminal, use export HOMEBREW_GITHUB_API_TOKEN=YOURAPITOKENWITHFUNKYNUMBERSHERE
(change that to your API Token) or add that to your .zshrc
and then do source .zshrc
(Catalina)
(Pre Catalina or using sill using BASH) .bash_profile
and then do source .bash_profile
- Login to your Github Account or create one if you don't have one yet.
- In the top menu to the right, click the tools icon (Account Settings).
- Click on “Applications” in the sidebar (to the left).
- In the box with the title “Personal Access Tokens”, press the “Create new token” button.
Note: As @rrotter mentions in the comments. ”UNCHECK EVERY SCOPE BOX when creating this token. There is no reason this token needs access to private information (unless you are developing brew casks in a private repo, but that's another issue)”. Credits to @rrotter
- In the next box (Create a new Personal Access Token) set the name of your Token (i used
homebrew
but you can use anything you want). Press “Create Token”. - When done, you will see your token we just created in the “Personal Access Tokens” box. Copy the Token by select the token or click the copy icon to the right of the Token text.
- The Token text should look something like this:
9927d2878ffa105fc5236c762f2fd7zfd28b841d
(not a real token, just an example)
IMPORTANT! Remember To Keep The Token Safe As It Works As A “Password” For Your Github Account.
- Fire up your Terminal.app (or iTerm.app)
- Use the command
export HOMEBREW_GITHUB_API_TOKEN=9927d2878ffa105fc5236c762f2fd7zfd28b841d
(but use your own API Token, and not the fake example one that don't work) and press enter. - It's now set, however, instead of repating this every session, let's add this to our .bash_profile (if you don't know about this, see this link.)
- Open your .zshrc (or: .bash_profile if still using) in your favorite text editor (in this case, we use Nano in the Terminal). Make sure that you are in your Home directory (if unsure, use
cd $HOME
and press enter). - Add the exact same line as in step 2. Press
ctrl + o
(to save) and thenctrl + x
(to quit Nano) - In your Terminal, do the command
source .zshrc
(loads the changes in the .zshrc file to the active session) (orsource .bash_profile
if still using, or on pre Catalina OS) - Well, that's it!
###Helpful links
Tags: homebrew, brew, github api, token, api token, terminal, mac os x
UPDATE--Problem solved - See bottom of post for resolution. I decided to leave this post in case others have similar issues (let me know if it isn't useful and I will delete)
Original Post
Wow. I just wanted to migrate from Baseflight, to Cleanflight to make use of the 'Autotune' function. This seems SO complicated! Here is what I have done so far.. any assistance would be greatly appreciated.
I'm sure I am doing something wrong that is really basic but this is frustrating... Now, I can't even connect with the Naze using Baseflight. I haven't tried arming the board using the battery and controller, but I doubt that will work because the ESCs are all beeping when I plug in the battery.
Is there a way to erase the board completely and start fresh or...?
I went back to Baseflight and was able to reflash Baseflight using "Flash on connect, No reboot sequence, Full Chip Erase" Do I dare try to load cleanflight again or just resign myself to being a 'Baseflight' kind of guy?? :-)
And DARE I did. I went back to Cleanflight and did a "normal" firmware flash (Full chip erase checked, selected the most recent Naze 32 firmware, loaded it from online, and clicked "Flash Firmware") AND IT WORKED!!!
Lesson Learned: If you are having problems going from Baseflight to Cleanflight, reflash baseflight, then try Cleanflight again>?