AWS CodeCommit with git-remote-codecommit - amazon-web-services

Im using windows and im trying to use git-remote-codecommit.
steps for HTTPS Connections to AWS CodeCommit with git-remote-codecommit.
https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-git-remote-codecommit.html
While fetching , this error shows:
git clone codecommit://MyRepositoryName
git: 'remote-codecommit' is not a git command. See 'git --help'
please help..

The other solutions did not work for me. I tried following https://docs.aws.amazon.com/codecommit/latest/userguide/troubleshooting-grc.html#:~:text=a%20CodeCommit%20repository-,I%20see%20an%20error%3A%20git%3A%20%27remote-codecommit%27%20is%20not%20a%20git%20command,-Problem%3A%20When%20you but it did not work as well.
What ended up working as doing a brew install git-remote-codecommit :)
$ which git-remote-codecommit
/opt/homebrew/bin/git-remote-codecommit
I am using a M1 Big Sur if that matters.

I had a similar issue. It turns out that somehow the git-remote-codecommit extension was somehow installed but broken.
I fixed it by first
uninstalling: pip3 uninstall git-remote-codecommit
reinstalling: pip3 install git-remote-codecommit
The install will check to see if Python3 is in your $PATH if not you'll need to add it.
This fixed the problem for me.

Need to run this command in terminal to solve this problem pip3 install git-remote-codecommit or pip install git-remote-codecommit

I was also facing this issue but it work after Force install git-remote-codecommit
pip install git-remote-codecommit --force
The same solution is given here as well.
https://www.miraclewebsoft.com/remote-codecommit-is-not-a-git-command-see-git-help/

i try to uninstall git-remote-codecommit and find the path that it's installed
C:\Users\user>pip3 uninstall git-remote-codecommit
Found existing installation: git-remote-codecommit 1.16
Uninstalling git-remote-codecommit-1.16:
Would remove:
c:\users\user\appdata\roaming\python\python39\scripts\git-remote-codecommit-script.py
c:\users\user\appdata\roaming\python\python39\scripts\git-remote-codecommit.exe
c:\users\user\appdata\roaming\python\python39\site-packages\git_remote_codecommit-1.16-py3.9.egg-info
c:\users\user\appdata\roaming\python\python39\site-packages\git_remote_codecommit\*
when i add this path to environment variable then it works.
c:\users\user\appdata\roaming\python\python39\scripts\

I faced the same problem when I installed the git-remote-codecommit using pip with --user flag which installed the package in the home directory.
pip install git-remote-codecommit --user
I fixed the problem by adding Python's Script path to the PATH environment variable.
C:\Users\{HOME_DIR}\AppData\Roaming\Python\Python37\Scripts

In my case I set-up the remote url
$ git remote set-url origin https://git-codecommit.*******/v1/repos/My-Project
I added a commit
and I push to master
git push origin master
and it works

Related

How can I upgrade AWS SAM to a certain version?

I'm trying to upgrade SAM CLI, version 1.18.2 to 1.22.0 on Ubuntu 20.04. I used brew command:
~brew upgrade aws-sam-cli#1.22.0
but didn't work. Showed the next message:
Error: No available formula or cask with the name "aws-sam-cli#1.22".
Also I'm trying to find a downloadable to install a certain version.
Thanks for your help!
https://github.com/aws/aws-sam-cli/issues/1767
For anyone in the future, use pip.
pip3 install --user 'aws-sam-cli==1.12.0'

AWS cli installation on Mac with anaconda python

I am installing aws cli on Mac. Previously I installed anaconda to control my python versions. So I installed python using conda. Now I want to install aws cli.
By using pip:
pip3 install awscli --upgrade --user
The installation was successful. However, when I run
aws --version
It told me that aws command was not found.
I again tried to add it to the command line path. But I could not find where it was installed.
When I run
which python
It gave me
/anaconda/bin/python
People say this might not be the real folder and it is true I could not find aws cli under it either.
I then run
ls -al /anaconda/bin/python
It gives
lrwxr-xr-x 1 mac staff 9 Aug 15 20:14 /anaconda/bin/python -> python3.6
I dont understand the path at all.
How could I find where my aws cli installed?
I ran into the same issue and eventually found the awscli command in ~/.local/bin. Just add /Users/<username>/.local/bin to your $PATH.
You can do this by editing ~/.bash_profile, which probably already has these lines in it:
# added by Anaconda3 4.4.0 installer
export PATH="/Users/<username>/anaconda/bin:$PATH"
You could make another copy of this line but replace the anaconda path with the new one, but I just updated the existing path since the two are related:
# added by Anaconda3 4.4.0 installer
export PATH="/Users/<username>/.local/bin:/Users/<username>/anaconda/bin:$PATH"
I solved the problem by using conda to install awscli.
conda install -c conda-forge awscli
worked so far. It seems that pip install does not work for conda installed python... Is this conclusion true?
If it's installing and then saying "command not found" it probably just means that the executable it has installed is not referenced in the operating systems PATH environment variable.
Here is how to add the downloaded executable to PATH: https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html#awscli-install-osx-path
Here is the AWS docs to troubleshoot the issue: https://docs.aws.amazon.com/cli/latest/userguide/troubleshooting.html
I encountered an identical situation.
I solved this by adding the location of the awscli command to the file...
/etc/paths
The location to my awscli command was where others had found it...
~/.local/bin
From my home directory in Mac OS X Terminal, I entered a quick nano command to edit the /etc/paths file...
sudo nano /etc/paths
#For those who don't know...
#sudo is to get admin access
#nano is quick and dirty file editor.
# /etc/paths is the file you want to edit.
I entered my password, then I just added the awscli command location at the end of the file...
/Users/UpAndAtThem/.local/bin
Yours might be be...
/Users/your_username_here/.local/bin
Still in Nano editor to exit and save: Hit control+X > Hit Y > Hit Enter.
Here's a quick video...
https://youtu.be/htb_HTwtgmk
Good luck!

php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64 when installing phpmyadmin

I have successfully installed php70 and mysql. But when i am trying to install phpmyadmin by
$ sudo yum-config-manager --enable epel
And Then
$ sudo yum install -y phpMyAdmin
It gives me
--> Finished Dependency Resolution
Error: php70-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Also after google sometimes i found a solution that try this
sudo yum install php70-mbstring
And i have tried this also, Still facing same error.
Any suggestion...?
I guess that you are following the Amazon tutorial to install phpMyAdmin ?
I had the same problem today and resolved it by uninstall PHP 7.0 with the yum command (the same given by Amazon with 'remove' instead of 'install' :
sudo yum remove httpd24 php70 mysql56-server php70-mysqlnd
and installed PHP 5.6 instead :
sudo yum install httpd24 php56 mysql56-server php56-mysqlnd
I don't know if this is a good solution, but it worked and I could install phpMyAdmin without dependencies problem. I hope it will help :)
In case you want to keep php7, I found a solution with AWS Amazon experts.
Just use :
sudo yum install -y php70-mbstring
I was having the same issue today. I had some success downloading phpmyadmin from phpmyadmin.net, and following their instructions. I did run into a different problem during the setup of phpmyadmin....
So, I punted on resolving this with the Amazon AMI for now, and chose to install the Bitnami LAMP AMI to get me going quicker. It comes with phpmyadmin configured.
NOTE: Bitnami's AMI is running PHP Version 5.6.29, so I would say it's valid to follow the previous post's advice and downgrade, unless your web application specifically needs PHP 7.0.

How to install homebrew packages locally

I got homebrew installed, however I do not have admin access. How do I install homebrew packages without admin access? Is there a local tag or something that I keep missing?
Homebrew needs /usr/local to be chown-ed to your user, and you need sudo for that. If you can’t you have to install it elsewhere. Some people use ~/.brew or ~/homebrew; you can use anything but avoid paths with spaces. See the docs here.
Let’s say you want to install in ~/.brew; run the following command:
git clone --depth=1 https://github.com/Homebrew/brew ~/.brew
Then ensure the bin and sbin directories are in your PATH. If you’re using Bash add the following in your ~/.bash_profile:
export PATH="$HOME/.brew/bin:$HOME/.brew/sbin:$PATH"
Run source ~/.bash_profile or restart your shell and run brew doctor to see if it’s installed correctly. It should warn you it’s not installed into /usr/local but that’s expected here.
To install homebrew without sudo.
git clone https://github.com/mxcl/homebrew.git
echo 'export PATH="/path/to/cloned_folder/homebrew/bin:$PATH"' >> ~/.bash_profile
Update the /path/to/cloned_folder with the path of the homebrew cloned folder.
Restart terminal and run
brew update
brew --version
git clone https://github.com/Homebrew/brew
pwd
echo 'export PATH="*RESULT_OF_PWD*/brew/bin:$PATH"' >> ~/.bash_profile
if it's for programming/building purposes you could also is easy to download the formula, extract the download url, and unzip it in your prefix (is your local folder): it's json https://formulae.brew.sh/api/formula/gtk+3.json

pip not working on windows python 2.7.9

I've installed Python 2.7.9, which comes with already bundled with pip. I've check that it's there in the modules list.
But when I run pip install
I get
SyntaxError: invalid syntax
With install highlighted as the error?
What am I doing wrong?
Seems like you are running pip install from Python interactive console. Instead, you should run it from Windows console (cmd or PowerShell):
python2.exe -m pip install <package_name>
Where python2.exe is executable for Python2.7.9 (you may need to include full path to the executable file) and <package_name> is the name of package you want to install
Append C:\Python27\Scripts;in PATH variable
where C:\Python27\Scripts; is the path where pip script is located.
I faced the same issue and got to know that the error is because it is not able to find the pip.exe to execute.
You need to check the path : C:\Python27\Scripts
There, you will find the .exe file and if you run the command from that folder, the command should not give you the error or while running the command, please provide entire path instead of just pip command.
just put python before pip
python pip install <package_name>
To install try the following command:
python.exe -m install web.py
what i would suggest is navigate to the location where pip is located and try with the following command :
Pip install
enter image description here
Probably you want to install Python Modules? I really did many tries, So Finally reached on point to install Python3.6. It offers most easiest way to install it's modules, Try this way
https://stackoverflow.com/a/46652413/8145641
Soon's anwser worked for me, with slight difference, without 2 after python:
python.exe -m pip install <package_name>
What I don't understand, is that this should be equal to the command in interactive console as following, isn't it ?
pip -m install <pachage_name>