Skip to content

Instantly share code, notes, and snippets.

@yuxincs
Created September 27, 2017 19:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuxincs/0f35acd635f550d03f3205399647b52f to your computer and use it in GitHub Desktop.
Save yuxincs/0f35acd635f550d03f3205399647b52f to your computer and use it in GitHub Desktop.
# Generate your identity key on openwrt
dropbearkey -t rsa -f ~/.ssh/id_rsa
# Convert public key from dropbear binary to openssh text
# Copy and paste output from below to bitbucket account ssh keys
dropbearkey -y -f ~/.ssh/id_rsa | head -n 2 | tail -1
# Change git ssh command
echo "#!/bin/sh" > ~/.gitssh.sh
echo "dbclient -y -i ~/.ssh/id_rsa \$\*" >> ~/.gitssh.sh
chmod +x ~/.gitssh.sh
echo "export GIT_SSH=\$HOME/.gitssh.sh" >> /etc/profile
# Now login again to openwrt
# Now use git (finally)
git clone git@bitbucket.org:<user>/<repo>.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment