I am very new to BitBucket.Problem is that PowerShell does not recognize git command.What I am trying to do is to Clone.When i copy address to PowerShell and press Return this message shows:
The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spellin
g of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:4
+ git <<<< clone https://B#bitbucket.org/B/firstrepository.git
+ CategoryInfo : ObjectNotFound: (git:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Does anyone know how to solve this?
Thanks in advance!
For posterity purposes I'm going to break out the hidden comment above by #bigyanshr into an answer:
Be sure to install the Git application as described on either this StackOverflow post or the Git 'Getting Started Installing Git' guide. This includes updating your PATH variable to include to your new Git installs 'Git/cmd' folder.
Related
Tried to create Dockerfile but not working.I am getting below the error.
Error:
If i tried in command prompt:
C:\Users\admin\D1>touch Dockerfile
'touch' is not recognized as an internal or external command,
operable program or batch file.
If i tried in VS Code terminal:
PS C:\Users\admin\D1> touch Dockerfile
touch : The term 'touch' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ touch Dockerfile
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (touch:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
How to resolve this issue?
Try vi Dockerfile or vim Dockerfile, if it is installed, it may work
It is not something specific to Dockerfile it will be the same if you will create any file. The reason for that is that you are trying a Linux command in the windows command prompt. If you want to use these commands, you need to have a *nix based tool on your windows machine first. In Powershell, I think the equivalent of touch is New-Item.
I am running below code in powershell as administrator to package msi to msix using msixpackagingtool.exe using powershell.
Invoke-Command -ComputerName remotecomputerip -ScriptBlock { MsixPackagingTool.exe create-package --template C:\tortoisesvn.xml }
But I am getting this error:
Program 'MsixPackagingTool.exe' failed to run: The file cannot be accessed by the system.
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
Can anyone help.
I don't think you can, I've never seen any docs on this. What is your use case?
However, other commercial tools that can build MSIX packages can connect remotely to a VM and perform the capture on that machine.
https://www.advancedinstaller.com/user-guide/repackaging-VMs.html
https://www.advancedinstaller.com/repackager.html
Tutorials: https://www.advancedinstaller.com/user-guide/convert-legacy-installations.html
Disclaimer: I work on the team building Advanced Installer
In our Azure Cloud Shell, Powershell mode we can't run ps1 files. Although we are doing the same asin the MS Doc.
Any Suggestions, what am I doing wrong.
PS Azure:\> dir
Directory: Azure:/Shared PAAS – Test/StorageAccounts/tstoweuyptobi/Files/azureshellfiles/goal0402preprod/powershell
Mode Name
---- ----
. Build_goal.ps1
. Test goal_Files.ps1
. test.ps1
Azure:/Shared PAAS – Test/StorageAccounts/tstoweuyptobi/Files/azureshellfiles/goal0402preprod/powershell
PS Azure:\> ./test.ps1
./test.ps1 : The term './test.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ ./test.ps1
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (./test.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Azure:/Shared PAAS – Test/StorageAccounts/tstoweuyptobi/Files/azureshellfiles/goal0402preprod/powershell
PS Azure:\>
The example below is from Microsoft Docs.
The trick is for the shell to be open in the location that the script is saved.
This will only work if your script doesn't use libraries that are stored on your local device. You may also need to import any modules needed, e.g. AzureAD
# change to your cloud drive fileshare
cd $HOME\clouddrive
# run the script
.\helloworld.ps1
Hello World!
The default directory for Cloud Shell does not seem to allow script running. Copy the script to "$HOME\clouddrive", change to that dir, then run it from there.
I am currently having an issue with visual studio code and erlang, I have erlang/OTP installed on my PC, and I have installed the erlang plugin for visual studio code, however I cannot run erlang from the internal terminal window. When I try to I receive this error:
erl : The term 'erl' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1
+ erl
+ ~~~
+ CategoryInfo : ObjectNotFound: (erl:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
any help would be appreciated.
From the VS docs
The shell [that is] used [by VS] defaults to $SHELL on Linux and OS X, and %COMSPEC% on
Windows. These can be overridden manually by setting
terminal.integrated.shell.* in settings.
So I would check what the value is of your %COMSPEC% environment variable. Or, you can override %COMSPEC% in the VS settings:
From the VS docs:
Correctly configuring your shell on Windows is a matter of locating
the right executable. VS Code defaults to the %COMSPEC% environment
variable on Windows which typically points to the 32-bit version of
cmd.exe.
Below are a list of common shell executables and their default
locations:
// 64-bit cmd if available, otherwise 32-bit
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\cmd.exe"
// 64-bit PowerShell if available, otherwise 32-bit
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"
// Git Bash
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
// Bash on Ubuntu (on Windows)
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe"
You may also want to check if the path to erlang is in your %PATH% environment variable, and if not add it. Have you ever successfully started up the erlang shell before, e.g. after you installed erlang to test that it was working?
Try the following guide and install erlang
https://www.rose-hulman.edu/Users/faculty/young/CS-Classes/resources/Erlang/index.html
I want to use get-vm command from powershell.
$my_vm = get-vm -Name MY_VM_NAME
Have error message that
The term 'get-vm' is not recognized as the name of a cmdlet, function,
script f ile, or operable program. Check the spelling of the name, or
if a path was incl uded, verify that the path is correct and try
again.
I found that I need to install Microsoft.SystemCenter.VirtualMachineManager
(how to run get-vm command on windows powershell)
Execute that:
PS C:\Windows\system32> Add-PSSnapin -Name
Microsoft.SystemCenter.VirtualMachineManager
Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.SystemCenter.VirtualMa
chineManager' is not installed on this machine.
At line:1 char:13
Do I really need to install that huge tool? I don't have enough space on my VM.
http://www.microsoft.com/en-us/download/details.aspx?id=10712
Is it another way to solve issue with get-vm?
Thanks!
You can look in to connecting to the machine that has VMM on it. You can use remoting to do this. You can find some more info about it here: http://windowsitpro.com/scripting/creating-remote-sessions-powershell-20?page=3