UPDATE:
I found the answer. You can't use a pass phrase when you generate the key. (It's an easy mistake to make, since the GitHub instructions strongly suggest that you do use a pass phrase. Presumably the case of deploy keys is an exception).
Have been trying to setup a Jenkins server on Ubuntu 14.04. Have installed Jenkins no problems, but am unable to connect to the secure repository URL. I'm getting permission denied (public key). I have tried a lot of solutions that I researched on the web, but still no success.
Here are the details:
Jenkins installed no problems and running as user jenkins
GitHub plugin is installed
Have followed the github instructions on keygen. I tried this as my own user (kim) on the ubuntu machine, and have also done it as the jenkins user
Am loading the public key as a deploy key against the github repo
Am loading the private key directly in the credentials in jenkins
Have tried numerous different usernames in the Jenkins credentials setup (including git, git#github.com, and my git hub user name)
The authentication test (ssh -T git#github.com) works no bother
I have tried this solution, Authenticate Jenkins CI for Github private repository. Again, the ssh test works fine (against the alias), but Jenkins still fails
I'm running out of ideas?
Related
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.
I have a server running ubuntu 18.04 running 3 Docker containers for Nginx, PHP, and MySql. Everything seems to be working correctly within the application which right now is just a test wordpress blog. However I am attempting to add Github Webhook deployments and I am a little lost as to how I should proceed. A few options
Should I setup a webserver on the Host system and trigger a php file to run and execute git pull? I suppose I could subdomain it to keep SSL validation constant.
Is there a way to pass ssh keys to one of the containers such as the php one and allow that to pull from the repo? I tried this and ran into user and group permission 1000 issues.
Is there a way for the docker containered application of nginx to execute code on the host server(The naked server running docker)?
Is there a simpler solution that I am not thinking of involving deployments? I would prefer not to use a paid service.
Are you using travis-ci or Jenkins to continuous delivery?
These tools help you to do some change in your server when you do a new pull request over your repo of GitHub.
I will show you one project that I was worked using travis-ci where I could deploy my App on Aws or connecting to one host that has docker installed and make new changes.
I'll share you some continuous delivery articles below
Travis continuous delivery
Jenkins SSH credentials setting
Jenkins from scratch CI/CD
Try to get new knowledge about Continuous Integration and Continuous Delivery, is the best way to automate those kinds of processes
I am using Jenkins Github plugin and was using public/private key for one repo, which was working alright. But I got problem when I added another repo, because github doesn't allow sharing public key across multiple repos.
So i integrated jenkins using github token (in Jenkins > manage > configure system and service in github) and removed private/public keys in jenkins server and github. Now when I add repo, I get Permission denied (publickey) error (image attached)
How do i integrate multiple github repos with my jenkins server?
Found the problem. There is key attached to account of user who's token was added to jenkins. My assumption was it should not have mattered as token was added. But that's not correct.
Added private keys of user who's token was used, in jenkins server and everything returns to normal
Got hint from Authenticate Jenkins CI for Github private repository
I an account on GitLab that was created using the sign in through GitHub option. When I attempt to connect a repository hosted on GitLab using the GitHub for Windows (GHfW) application, it asks for my username and password for GitLab. The problem is I technically don't have a username and password for GitLab. On the off chance it would work, I tried using my GitHub username and password, but that doesn't work.
I haven't been able to find anything that solves this issue. Is there anything I can do to get the GHfW application to work with this account and repository?
I just created a CentOS 6.3 VM and followed these instructions for the gitlab install: http://howto.basjes.nl/linux/installing-gitlab-on-centos-6
I've tried this installation with both gitlab v3.01 and v2.91.
Here is what is working for me:
I can complete the gitlab install without problem
From the command-line, I can use passwordless authentication from the the gitlab service account to the gitolite service account
From the command-line, I can clone the gitolite-admin repo, make changes, and pushes the changes back to the remote repo
I can start the rails web app
I can login the web management site
I can create new accounts and login with the new accounts
Here's what I can't do:
I can't create projects (Repos)
I can't add ssh keys
I always get the same error:
GitLab was unable to access your Gitolite system.
In the githost.log log file, I get a less than useful error:
ERROR -> Timeout::Error execution expired
I've double checked permissions
Reviewed the gitlab.yml config file
Ran through the four suggested troubleshooting tips from the web page
Tried different versions of gitlab, but no matter what I do, I keep getting the same error.
I'm stuck because the logs don't tell me anything and I am able to access the gitolite repositories with the gitlab service account without issue. Anybody have any success with the most recent versions of CentOS/Gitlab/Gitolite? Any help would be much appreciated, thanks!
I know this is kind of late - but for completeness.
I've run into the same problem doing installation on recent Debian version.
It is, or was for me, caused by an old version of redis-server.