I have set up a django project on EC2 following https://shirtdev.wordpress.com/2011/05/04/setting-up-a-git-repository-on-an-amazon-ec2-instance/. Now I want to clone it so that I can develop locally. The instructions in the tut say:
git clone username#hostname.com:the_project.git
I know this can't be right because I would need to use a private key and the path to the project is:
/home/ubuntu/tproxy/testproject
How cam I clone this repo?
Related
I'm new to AWS and I need some assistance with a quick project.
I'm trying to export some of my code located on my Ubuntu Server onto CodeCommit repository. The code lives on multiple docker containers.
Would anyone be able to provide a guide on doing so?
Much appreciated!
CodeCommit == Git.
So if you want to "copy" from a CodeCommit repository, all you should need to do is a git clone.
EXAMPLE:
https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-connect.html
cd /my/local/directory
git clone https://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo my-demo-repo
This will create a copy of your CodeCommit repo into local repository "/my/local/directory/my-demo-repo".
Is there a way to add multiple git repositories in the same Google cloud project?
You currently cannot do this. We know this is a useful feature, and we're working hard on it. Stay tuned!
We've added the ability to have multiple Cloud Source Repositories for every cloud project.
You can read about how to add a new repo to your project here: https://cloud.google.com/source-repositories/docs/setting-up-repositories
There is no way of doing this as of today. Every project can only have one remote repository.
Git submodule should do the trick. Add git repositories as submodules.
See
https://git-scm.com/docs/git-submodule
https://git-scm.com/book/en/v2/Git-Tools-Submodules
No, there isn't, but you can use Git subtree merges to add multiple "subrepositories" as folders in your main repository, which will do the trick.
See details here https://help.github.com/articles/about-git-subtree-merges/
(There are also submodules as #Shishir stated, but as I understand they are only set for your current local clone and won't be included in checkouts/clones done by others, so I think submodules won't work).
Every Google cloud project can only have one remote repository.
However, t's definitely possible to have multiple local repositories that correspond with the same remote Google cloud repository.
The official documentation describes the following procedure for how to use a Cloud Source Repository as a remote for a local Git repository :
Create a local Git repository
Now, create a repository in your environment using the Git command
line tool and pull the source files for a sample application into the
repository. If you have real-world application files, you can use
these instead.
$ cd $HOME
$ git init my-project
$ cd my-project
$ git pull https://github.com/GoogleCloudPlatform/appengine-helloworld-python
Add the Cloud Source Repository as a remote
Authenticate with Google Cloud Platform and add the Cloud Source
Repository as a Git remote.
On Linux or Mac OS X:
$ gcloud auth login
$ git config credential.helper gcloud.sh
$ git remote add google https://source.developers.google.com/p/<project-id>/
On Windows:
$ gcloud auth login
$ git config credential.helper gcloud.cmd
$ git remote add google https://source.developers.google.com/p/<project-id>/
The credential helper scripts provide the information needed by Git to
connect securely to the Cloud Source Repository using your Google
account credentials. You don't need to perform any additional
configuration steps (for example, uploading ssh keys) to establish
this secure connection.
Note that the gcloud command must be in your $PATH for the
credential helper scripts to work.
It also explains how to create a local git by cloning a Cloud Source repository :
Clone a Cloud Source Repository
Alternatively, you can create a new local Git repository by cloning
the contents of an existing Cloud Source Repository:
$ gcloud init
$ gcloud source repos clone default <local-directory>
$ cd <local-directory>
The gcloud source repos clone command adds the Cloud Source
Repository as a remote named origin and clones it into a local Git
repository located in <local-directory>.
I am new to django project and github.
I am trying to deploy a django project in my local system. From the documentation they asked me to clone spatial repository.
How can clone with spatial repositry?
I have already installed neo4j.
From where I have to do cloning.Project root directory or core project?
actually you can clone repository using git command
git clone https://github.com/neo4j-contrib/spatial.git
it will download the spatial files in your current path
I am trying to deploy a django project on openshift for testgin puposes. I tried to use this process described here but can't seem to be able to work it out. I successfully create my app using
rhc app create django python-2.6
But when I try to add the git it gives me the following error
fatal: Not a git repository (or any parent up to mount parent )
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
What am I doing wrong?
At creation time, Openshift should create a directory django with a skeleton WSGI application, and git folder containing the remotes needed so you can just git push its contents to the Openshift app repo.
If you are working in another directory, you have to git init and then add the remotes to Openshift.
I am using separate servers for dev, test and production environments. I have git installed on my local machine and have separate branches for each environment. How can I deploy the code from each branch to its respective server using GIT?
FYI: GIT is not installed on server.
Thanks in advance.
Simrat
You should have git installed on server,
use the following command to push you code to your remote repository
git push remote_repository_url branch_name
use the following commands to fetch or deploy the code from remote repository to your corresponding machine .
git pull remote_repository_url branch_name
or
git fetch remote_repository_url branch_name
Use fetch command to avoid the merging
Even you can use git clone command to clone the specific branch from your remote_repository(assembla) to your corresponding server >
git clone --branch branch_name remote_repository_url