extension
1 TopicHow to use GitHub Copilot for Azure?
Good news for everyone - GitHub Copilot is now available for free in VS Code!! Excited to try GitHub copilot for Azure in VSCode? Prerequisites: Account in GitHub Sign up for GitHub Copilot Account in Azure Install VSCode Step 1. Installation How to install GitHub Copilot for Azure? Open VS Code, in the leftmost panel, click on Extensions, type – ‘GitHub copilot for azure’, and install the first result which is by Microsoft. As shown in the Fig. 1.1 below: Fig. 1.1 How to install GitHub Copilot for Azure in VSCode 2. After this installation, you will be prompted to install – GitHub Copilot, Azure Tools, and other required installations. Click on allow and install all required extensions from the same method, as used above. Fig. 1.1.1 Installation of GitHub Copilot and sign in with GitHub Step 2: Enable How to enable GitHub Copilot in GitHub? Open GitHub, Click on top rightmost Profile pic, a left panel will open. Click on Your Copilot. Fig. 1.2 Locate GitHub Copilot Upon opening, enable it for IDE, as shown in the below Fig. 1.3 Fig. 1.3 Enabling Copilot Chat in the IDE Step 3: Walkthrough Open VSCode, and click on the GitHub Copilot icon from topmost right side. This will open the GitHub Copilot Chat. From here, you can customize the model type and Send commands. Type azure to work with Azure related tasks. Below Fig. 1.4 will help to locate the things smoothly: Fig. 1.4 Locating GitHub Copilot Chat in VSCode Scenario: Using the GitHub Repository If you have any of your project already available in the GitHub public repository, then paste the link of it in the chat section and append it with the below prompt: Prompt: This is my website deployed locally in GitHub, help me deploy in Azure. Hit Enter from the keyboard or Click the arrow sign, and proceed further with the instructions generated by the Copilot. Note: You will be prompted to Authenticate your Azure Account, simply follow the instructions said to authenticate. If you don’t have any website, paste the prompt written below in the chat section: Prompt: Could you help me create and deploy a simple Flask website by using an azd template? Fig. 1.5 Reply from GitHub Copilot for Azure As visible in the above Fig. 1.5, the GitHub Copilot for Azure will send template in the response. Hover the arrow over it, and then click on Insert into terminal, this will automatically insert the command in the terminal. Meanwhile, you may need to Authenticate your Azure Account, simply follow the instructions said to authenticate. It will take a few minutes to initialize. Meanwhile, answer the questions it asks, if unsure, simply ask the same question by copy pasting in the GitHub Copilot Chat, and it will guide you. You can ask more questions like: What does azd init command do? How the website will be deployed? What region, should I select? Once, you are clear with all of the doubts, type azd up command in the terminal, this will deploy the website in azure. Fig. 1.6 GitHub Copilot guiding the user to deploy This Command will ask which subscription you want to use to deploy your website. Fig. 1.7 Finding Subscription in Azure Portal Open the Azure portal, and type subscription in the search bar, as visible in Fig. 1.7. Click the first result and copy paste the Subscription ID visible there, to the GitHub Copilot chat, and append something like below: <Subscription ID> This is my Azure Subscription ID, deploy my website using it. <I reside in <Country Name> Once, done, you would be able to view the deployed website along with the new resources created in the Azure Portal. To un-deploy it, to free up the Azure resources, ask the same to GitHub Copilot, and it will guide you further! Tips and Tricks: For any error or Questions, directly ask to GitHub Copilot for Azure and it will answer your all queries, no limit! If unsure about anything, just paste the subscription id and share your country in the chat to get customized queries to run! Summary: GitHub Copilot can be used in VS Code for free, by installing thru extensions tab of VS Code. The deployment is done using just 2 commands: azd init and azd up To un-deploy, simply visit the directory and type azd down Happy 2025 with unlimited experiments using GitHub Copilot for Azure @VSCode for free!433Views3likes0Comments