create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
Step 1: Generate first ssh key Type the following command to generate your first public and private key on a local workstation. Next provide the required input or accept the defaults. Please do not change the filename and directory location.
workstation 1 $ ssh-keygen -t rsa
Finally, copy your public key to your remote server using scp
<html> | |
<head> | |
<script type="text/javascript"> | |
// A CSRF token is required when making post requests in Django | |
// To be used for making AJAX requests in script.js | |
window.CSRF_TOKEN = "{{ csrf_token }}"; | |
</script> | |
</head> | |
<body> | |
<h2>My Blog Posts</h2> |
The only way I've succeeded so far is to employ SSH.
Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config
file in a .ssh
directory. The config
file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh
directory by default. You can navigate to it by running cd ~/.ssh
within your terminal, open the config
file with any editor, and it should look something like this:
Host * AddKeysToAgent yes
> UseKeyChain yes
app.get('/', async (req, res) => { | |
// Get signed URL with action 'read' | |
const signedUrl = await getReadSignedUrl(bucketName, videoName, 10); | |
let output = `<video width="400" controls> | |
<source src=${signedUrl} type="video/mp4"> | |
</video>` | |
res.send(output); | |
}); |
app.get('/', async (req, res) => { | |
const bucket = storage.bucket(bucketName); | |
const file = bucket.file(fileName); | |
const readStream = file.createReadStream(); | |
//Pipe data from the read-stream into the HTTP response body | |
readStream.pipe(res); | |
}); |
async function generateV4UploadSignedUrl() { | |
// The ID of your GCS bucket | |
const bucketName = 'your-unique-bucket-name'; | |
// The full path of your file inside the GCS bucket, e.g. 'yourFile.jpg' | |
// or 'folder1/folder2/yourFile.jpg' | |
const fileName = 'your-file-name'; | |
// These options will allow temporary uploading of the file with outgoing | |
// Content-Type: application/octet-stream header. |
async function generateV4SignedPolicy() { | |
// The ID of your GCS bucket | |
const bucketName = 'your-unique-bucket-name'; | |
// The ID of your GCS file | |
const fileName = 'your-file-name'; | |
const bucket = storage.bucket(bucketName); | |
const file = bucket.file(fileName); |