-
Amend
/home/.profile
as follows:Remove the existing PS1 line beginning.
export PS1=
Add the following code:
parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } WHITE="\[\033[1;37m\]" GREEN="\[\033[32m\]" YELLOW="\[\033[0;33m\]" CYAN="\[\033[0;36m\]" NOCOLOR="\[\033[00m\]" export PS1="\n$GREEN\u@\h $YELLOW\w$CYAN\$(parse_git_branch)$NOCOLOR\n$ "
Save and upload (makes sure to use unix line endings)
-
Host cloudhostname HostName c8888.paas2.ams.modxcloud.com Port 22 User c8888
You can now connect simply using the alias
ssh cloudhostname
-
# Mac OS X specific .DS_Store config.core.php ht.access index.php # ignore assets exept css/, js/ assets/* !assets/css/ !assets/js/ manager/* connectors/* # ignore everything in core/ exept static/ # to ignore other components add: !core/component/your_component_name core/* !core/components/static/
-
cd www git config --global color.ui auto git config --global user.name "Your Name" git config --global user.email you@example.com git init git add -A git commit -m "initial commit"
-
git remote add origin git@bitbucket.org:user/project.git git push origin master
Because we haven't setup our SSH keys the push command should return the following:
Permission denied (publickey). fatal: The remote end hung up unexpectedly
This part is a bit of a faff but is necessary unless you want expose all your repositories to the private key uploaded to MODX Cloud. Creating a new account allows you to grant this account access on a per repository basis. For more information see the following links:
[Additional read-WRITE key per repository basis](https://bitbucket.org/site/master/issues/6887/additional-read-write-key-per-repository)
[Extend deployment keys to allow both: read/write](https://bitbucket.org/site/master/issues/8873/extend-deployment-keys-to-allow-both-read)
1. Create a new bitbucket account. You must use valid email address so you can validate the account.
2. Create your SSH key pair [Set up SSH for Git](https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html)
3. Upload your public key to the newly created bitbucket account
4. Go back to your main bitbucket account which hosts your project repository and go to `Settings > Access management` and search for your newly created bitbucket user. Add the user and grant them write privileges.
-
-
Upload your key to
/.ssh
eg./.ssh/id_rsa
-
Set permissions to 400
-
Create a file named
config
containing:Host bitbucket.org IdentityFile ~/.ssh/id_rsa User git
-
Upload the file to
/.ssh
-
-
`Git push origin master`
-
{ "type": "sftp", "save_before_upload": true, "upload_on_save": true, "sync_down_on_open": true, "sync_skip_deletes": false, "sync_same_age": false, "confirm_downloads": false, "confirm_sync": true, "confirm_overwrite_newer": true, "host": "c8888.paas2.ams.modxcloud.com", "user": "c8888", "password": "password", "port": "22", "remote_path": "/www/", "ignore_regexes": [ "\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json", "sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/", "\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini", "manager", "connectors", "core/cache/", "core/config/", "core/docs/", "core/error/", "core/export/", "core/import/", "core/lexicon/", "core/model/", "core/packages/", "core/xpdo/", "node_modules" ], "extra_list_connections": 4, "connect_timeout": 30, "preserve_modification_times": true, }