SSH and GIT

Sometimes when you try to push code to a remote git repository, you may come across this error:

Permission denied (publickey).
fatal: Could not read from remote repository.


Please make sure you have the correct access rights

Here are a few things to check on a mac.

Start the ssh-agent with this:

eval `ssh-agent` 

Run

ssh-add -l

This will list any keys already added to the ssh-agent. If no keys are presently added, 

The agent has no identities.

will be shown.

Add your key by running:

ssh-add -K ~/.ssh/your_private_key

Development Environments

When you are developing web applications, whether it is a Python REST API or an internal SharePoint solution, having a smooth development workflow is closely tied to having the right development environments.

Typically this would involve three or four seperate environments:

Dev
Testing
Staging
Production.

Linux commands

Whether I’m working in the terminal on a mac or on a Linux web server, here are my most used Linux commands:

ls -la

ls is used to list files and directories. The options I use most often with this command are -la.

-l
is used to show further information about the files / directories. It is the long listing format and shows file permissions, owner information, file size and time of last modification.

-a
hidden files and folders are not included by default. -a makes sure they are also shown.

 

pwd

Stands for “print working directory”. This command outputs your current location in the file system.

 

cd

Useful key combinations:

shift + a
shift + e