is there a way to mirror digital oceans unto a new github repo without using the old github repo(if it exists) - github

a client of mine has deployed a project he was using GoDaddy then migrated to digital oceans, I want his Github repo but the one on go daddy is outdated and unusable, the DevOps that did the migrations is not responding, so I was thinking if there is a way to clone/mirror from a digital oceans droplet unto a new github repo

Perhap you could use hub.
If you can ssh into the droplet, you just need to cd into the repo, install hub on the droplet, change the origin url to the one you want, and then run hub create. Don't forget to add the droplet's public ssh key to your github to allow hub to access it.

Related

Automatic pushing to Dreamhost from Github via Workflows

Recently transitioned hosting my website to Dreamhost from Netlify in order to host a dynamic site. One thing I miss is the ability to automatically deploy from Github to the hosting service when changes are detected in my repo.
I've found tutorials for pushing to Github from my Dreamhost server, but not the other way around. I have multiple people working on this website, and my hope is to do this centrall via Github instead of manually pushing to both Github and the Dreamhost server thru the command line.
My assumption is that to ssh to Dreamhost I need a public key from my client to store on the Dreamhost server. I don't know if this is possible to generate a public key from Github (related to the workflow), but if it is how I would I do it? The other option is to store the ssh credentials with Github repo secrets to connect, but I feel this isn't best practice.
How would I go about pushing my Github repo to my Dreamhost server automatically after changes to main?
Two different gists suggest the same approach.
Create a bare repo on the DreamHost server
push to it
have a post-receive hook doing the git restore in the target folder (on the same server) where the actual site is deployed
See "How to Git Push to a Server Machine without having to ssh on to that machine every time?"
What remains for your GitHub Action is, as describe in Deploying to a server via SSH and Rsync in a Github Action, to use a dedicated SSH key, whose private key is registered in GitHub secrets.

Can a private github repo be synced with pythonaywhere

I want to sync a Django project with pythonanywhere. But the Django repo is private is it possible to do so. So, that the deployment is up to date with the repo.
Yes, it is possible. You could set ssh key-pair on your PythonAnywhere account and add it to your GitHub account. Then pull your code on the PythonAnywhere side and re-load your web app.
You could also automate the whole process. See the tutorial: https://blog.pythonanywhere.com/191/

How do I set up a gitlab integration in Bluemix DevOps ToolChain?

IBM Bluemix DevOps ToolChain allows source code repositories to be only github and IBM version gitlab. My repo is in the public gitlab cloud and i do not intend to move it to IBM's gitlab cloud. How do I set up my Toolchain?
Update: It is now possible to add gitlab.com repositories (or repositories from any other GitLab server on the public internet) to Bluemix DevOps Toolchains. More details are available in the Bluemix Documentation.
Original (outdated) answer:
It is not currently possible to add repositories on gitlab.com or other public GitLab servers to an IBM Bluemix DevOps toolchain. However, that capability is actively under development.
Until that feature is available, you could proceed by duplicating your repository to one of the supported Git providers. There are instructions for duplicating a repository at https://help.github.com/articles/duplicating-a-repository/. In short:
git clone --bare https://github.com/exampleuser/old-repository.git
cd old-repository.git
git push --mirror https://github.com/exampleuser/new-repository.git
The example uses github.com, but this approach would work for any git repository.
I think this has been added recently, you can just pick it when you add a tool to your toolchain. There's also a blog post about it https://serifandsemaphore.io/build-a-serverless-api-in-seconds-with-go-c504398d86f6

Integrate github with Openshift

I think this question has already been asked but i am still not clear about it.
This is my question:
I already have a Github Account with an existing repo. I want to start a project on Openshift, but Openshift creates it's own git repo in cloud and i have no access to it just like i have to my existing Github account. So what i want to do is integrate existing Github account with Openshift so that openshift will not use it's own git repo.
I think you have understood my question.
Openshift needs to use it's own git repo. That's how you update your Openshift app. From there you create/add a remote (ex. Github) if you want to update that also.
There are examples on how to merge your Github repo to Openshift to start. You will have to google it because I don't have the link handy now. Sorry.

How do I set up my AWS EC2 Elastic Beanstalk project to collaborate with others?

I have been working on AWS EC2 using Elastic Beanstalk for a few months now. Everything is going well. Now, the client wants to add another developer to the project. I am a little unclear as to how to do this. It seems that Elastic Beanstalk is using git in the background and is push only. I can't clone the repo. I am not even sure where to go to find the repo.
So, my question is, how to I set things up (or have others set things up) so they can collaborate with me?
EDIT: I suppose another way of asking this question is: If Elastic Beanstalk has set up my Git repo for me, how to I check that Repo out and share it with others?
I am using Visual Studio 2010 (with AWS tools installed) on a Windows 7 machine and the remote instance is Windows.
Thanks.
Elastic Beanstalk doesn't have any concept of a repo. An application version is just bundle that's stored on S3.
What you'll have to do is host a repo at someplace like Github or Bitbucket. Then you share your changes as you would any other project. When it comes time to deploy a version to Elastic Beanstalk, you'd execute git aws.push rather than something like git push origin. Of course this assumes that you've already set up the AWS git dev tools.
As an aside, I'd recommend that you set up an IAM user account for each developer so everyone has their own set of AWS access keys. This would allow you to revoke deployment access to a person without affecting anyone else.