so I have a self-hosted Gitlab, I use Git kraken pro and git for windows to enable the LFS component.
I'm having the issue where when I push to my repository git kraken asks for authentication. (Username and password.) How ever I have no such issue when I pull the data, it will just do the job. And the same is for the LFS, I can pull but not push the data without a password.
Here is the set up:
I have not been successful in setting up the ssh keys at this point as it refuses to use them and I'm still trying to work that issue out.
I have pressed the "remember me" option for the pop up and that doesn't seem to work
I have set up the access token and that all works.
The GitLab ce is installed on a Linux OS and I am connecting to it via 4 windows PC's using git kraken (all on pro licenses).
Git lab CE is updated to the latest version and same for git Kraken
Obviously, the preferred method of connection to the git is SSH but it refuses to work. I have tried the git kraken's version of ssh and manually creating and installing the keys using cmd line.
When I enter the U/P to push the data it only works for that single push even if I don't restart git lab. Every single time I need to place a user name and password and this is tiresome.
What I'm asking is, how can I fix this? This is my first full-fledged self-hosted git, and I've learned things on the fly, I do have normal git experience but the set up for the self-hosted is a lot more involved compared to just using git itself.
The reason I am self-hosting is, cost. My repos are GB in size and I have many. So, I need to have my own set up to avoid having those kinds of costs.
How can this be fixed?
When I enter the U/P to push the data it only works for that single push even if I don't restart git lab. Every single time I need to place a user name and password and this is tiresome.
Double-check if your GitKraken is actually using an SSH URL (git#yourServer:user/repo), as a username/password should only work for HTTMS URL (https://yourServer/user/repo)
Check the SSH port is reachable from your windows:
curl -v telnet://yourServer:22
If it does not connect, double-check your Omnibus installation on Linux, making sure the SSH daemon is started and active, using the right sshd_config.
The OP Maize adds in the comments:
A complete reinstall and removal of setting in GitKraken solved the issue.
Previous uninstalled seems to of kept the settings, so when I removed those, it sorted itself out.
This post relates to a rapidly changing event.
I simply want to connect to my GitHub account. When I do it, I get this error message as a small red pop up on the upper right side of the page:
Items could not be retrieved, Internal server error.
As of May 25, 2022, at 19:52 UTC, GitHub integration has been re-enabled:
We are happy to report that the GitHub integration is re-enabled! You can now reconnect with GitHub and restore your Heroku pipeline functionality, including Review Apps, with newly generated tokens.
You can connect to GitHub immediately or wait for the enhanced integration as described in this blog post. To re-establish your GitHub connection now, please follow these instructions.
Here is what the referenced blog post says about "enhanced integration":
In an effort to improve the security model of the integration, we are exploring additional enhancements in partnership with GitHub, which include moving to GitHub Apps for more granular permissions and enabling RFC8705 for better protection of OAuth tokens. As these enhancements require changes by both Heroku and GitHub, we will post more information as the engagement evolves.
No timeline is mentioned for availability of the enhanced integration.
Between April 15 and May 25, 2022, Heroku's GitHub integration feature was disabled while Heroku investigated a security breach. During that time, deploying was still possible via other means, most notably via git push.
To mitigate impact from potentially compromised OAuth tokens, we will revoke over the next several hours all existing tokens from the Heroku GitHub integration. We are also preventing new OAuth tokens from being created until further notice. Your GitHub repositories will not be affected in any way by this action.
Which Heroku features have become non-operative due to the removal of the Heroku-GitHub integration?
Enabling review apps
Creating (automatic and manual) review apps
Deploying (automatic and manual) review apps
Deploying an app from GitHub (either manual or automatic)
Heroku CI cannot create new runs (automatically or manually) or see GitHub branch list
Heroku Button: unable to create button apps from private repositories
ChatOps: unable to deploy or get deploy notifications
Any app with a GitHub integration may be affected by this issue. To address specific integration issues, please open a case with Heroku Support
Migrating from GitHub deployment to Git deployment
At 2022-04-21 23:53 UTC, Heroku provided extended instructions for migrating from GitHub-based deployment to Git-based deployment:
While our customers remain unable to reconnect to GitHub via the Heroku dashboard, we wanted to share a supplement to the code deployment methods previously provided. For instructions on how to change your deployment method from GitHub to Heroku Git, please refer to the following Help article: How to switch deployment method from GitHub to Heroku Git with all the changes/app code available in a GitHub repo.
This is due to an issue reported at their status portal, here.
For now, the solution is to use another pushing strategy.
The best one, for now, is using their remote with Heroku CLI. The steps for it are:
1. Install the Heroku CLI if not yet installed
Further information about installation and setup can get here
2. Perform login with the heroku login command
You will be prompted with your default browser window for completing the login at the Heroku portal.
3. Assuming you already have your app set up at Heroku (if not, please follow this), you just need to add a new remote for your Git repository with Heroku CLI.
Run heroku git:remote -a example-app - substitute "example-app" with your app name.
4. git remote -v to check if the remote has been set successfully
You should see something like this appear as a response:
heroku https://git.heroku.com/your-app-name.git (fetch)
heroku https://git.heroku.com/your-app-name.git (push)
5. Push your branch to the new heroku remote
git push heroku your_branch_name
6. You should see the progress of your deployment being displayed in the terminal
The reference for this answer has been taken from here, which can also be used if further information other than the one provided in this answer is needed.
I'm in the same situation, and, as others stated, it's due to a Heroku security issue. In the meantime, you can deploy your code by using the Heroku CLI.
So, on the Heroku web dashboard, select Heroku Git:
Then set up the Heroku CLI with heroku login.
Finally, if your repository already exists on GitHub, you need to add a new remote by running:
heroku git:remote -a your_app_name
git push heroku master
You can find more information about this solution in the official documentation.
It is just a temporary thing, and more details about this issue are here.
You could push to both GitHub and Heroku at once for a temporary solution:
git push -u origin <branch>
git push heroku <branch>
I see the previous answers, but since I was facing an issue with review-apps (PR apps), mostly you will be working with different branches in that case, so here is a solution for pushing your stuff other than the (master/main) branch to Heroku.
First make sure your remote origin is set up correctly
heroku git:remote -a your_awesome_app
You can also confirm it by git remote -v and you should see your origin pointing to your Heroku application.
git remote -v
heroku https://git.heroku.com/your_awesome_app.git (fetch)
Here origin name is heroku.
If you want to deploy your changes from the main branch
git push heroku main
If you want to push your changes from feature branch (other than the* main branch)
Then push your feature branch to Heroku using the below command
git push heroku feature:main
heroku - is your origin name (confirm your origin name with git remote -v
feature - is your current branch which is other than main/master branch (check your branch name with git branch or git status)
For those who are using this integration for deployment purposes this, I suggest you use the deploy to a Heroku GitHub action here:
Deploy to Heroku
That way, you do not have to make significant changes to your deployment workflow.
I had the same issue. I already had cli installed.
git remote
Output:
heroku
origin
git remote -v
Output:
heroku https://git.heroku.com/YOUR-APP.git (fetch)
heroku https://git.heroku.com/YOUR-APP.git (push)
origin https://github.com/GitUserName/yourRepo.git (fetch)
origin https://github.com/GitUserName/yourRepo.git (push)
Verify using the Git branch, if your branch is named main. For example, you would do:
git push heroku main
For me it is
git push heroku master
Now push your local changes
git push heroku master
Output:
To https://git.heroku.com/YOUR-APP.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://git.heroku.com/YOUR-APP.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I do not care that it is different than its remote. I've been developing locally and did not realize the automatic Git deploys had been failing. I care about the local changes:
git push heroku master -f
Now the deployed application is working as expected.
If you are getting an error while trying to push, it may be due to having different branch names for development vs deployment. In such a case, follow the instruction below;
If you are developing on a branch and deploying via Git you must run:
git push heroku <branchname you're developing on>:<branch you're deploying from>
This article goes into details on the behavior:
Duplicate Build Version Detected
Here's the easy work pattern I have used for Heroku. This is intended to help others who may not have gone through this before. I used this previously (2014-5) and had to set it up again last night to push.
First add the Heroku remote:
git remote add heroku https://git.heroku.com/YOUR-APP.git
As GitHub is often "origin" (git push origin...), this adds another remote destination, "heroku" (git push heroku...)
git remote
Output:
heroku
origin
My pattern for code/git/pushing:
Local development is the same. Push to GitHub, merge, and nothing changes.
Set your deploy to "Heroku git" as #a-chris outlines.
To push to Heroku, simply push the correct branch to the newly added "heroku" remote source. I use the --force option to dismiss any possibility of conflict. Unless you have been using Heroku Git and branching previously, there should only be one branch - typically "master" to use.
This will trigger a deploy. You can watch or review in the dashboard as well as the terminal. Treat the new "heroku" source as a directory to dump code to promote and not a repository you want to keep history, etc. A second-class citizen in this particular pattern.
I push from my local terminal now instead of auto-deploy or via the dashboard button. If your organisation is large, I recommend controlling access. Many developers may not have experience juggling multiple destination repositories or to catch an accidental push.
To trigger a local push, be sure your master (or whatever) is up to date...watch your commit hashes!
This will set you up to follow advice such as BR19_so and others.
Henrique Aron's answer is working for the local machine.
For a remote SSH server, you will face an IP mismatch error.
To resolve it:
Log in to the Heroku website
Go to account settings
Reveal the API keys in the panel
In the server CLI, type heroku login -i
Input email, use the API key as the password, and you can follow the rest of the steps of a Git remote push
I am using a 2014 MacBook Pro with macOS 11.6.5 (Big Sur) version for command
brew tap heroku/brew && brew install heroku
I was getting an error and a message to update to the latest Xcode. The latest Xcode needed the latest macOS, which I could not upgrade to (I needed a 2015 MacBook Pro or newer). For a 2014 MacBook Pro, I was able to Install Xcode_13.2.1.xip and was able to run. Now I can push updates to Heroku.
brew tap heroku/brew && brew install heroku
There is an update regarding this issue. You can now enable GitHub integration as mentioned in the update.
If it doesn't work, you can try removing the App connection to GitHub (disconnect) and adding the connection again. Adding the connection again can also be done in incognito mode because sometimes an issue occurs related to cookies (mentioned here).
I used mac github client to push my codes to my github account. On my Ubuntu linux computer I wan't to connect to github using the terminal so that it will automatically sync will all my projects on github. How would I do it? All the online help I have bumped in to so far only show how to clone an exiting git repository not how to connect to my github account and sync it.
git, the revision control system, doesn't know anything about Github, a website that keeps track of and hosts your git repositories for you. The concept of a Github account is totally alien to git, so you'll never be able to, say, browse all of the projects you own on Github with a git command. git only works on the level of individual repositories.
Github also provides a graphical client that handles both the git level stuff and the Github level stuff -- it understands what a Github account is, and will log in for you and display all of the repos associated with the account. It's also a fully featured git client that does a lot of work on the level of individual repos for you. However, this graphical client is currently only available for Windows and OS X, and is not available for Linux.
My own workflow on Linux is to use the github.com website plus the command-line git tool. To bridge the gap between Github and git, you need to git clone individual repos. Aside from that, you can do Github administrative tasks on the website, and you can work with individual repos with git on the command line.
If you don't like this work flow, you need to look at graphical git clients for Linux. I'm not sure if any exist that will do both git-level stuff and also interface with Github specifically and understand the idea of a Github account.
You could also theoretically try to run the Windows client in wine on Linux, but I would not recommend this approach except as a last resort.
First I don't know a program that automatically sync all my github repositories.
First you have to install git (if it has not been done already) tutorial
Than you should generate a rsa:key to be able to 'push' your repositories to github.
You can generate a rsa_key by following this tutorial notes ssh-add id_rsa should be ssh-add id_rsa.pub ....also you can name id_rsa as anything you want: like bran_rsa_key
You should post or add your rsa_key to git hub at this address. If you go to that link you will see that you already have some key for your Mac but nothing for your Ubuntu.
After installation you could install ungit if you're not that familliar with git
Ok, I am trying to auto deploy my node.js application with git.
This is what I have on my server:
/home/git/myproj.git - bare repo
/home/me/public_html - cloned repo of the aforementioned bare repo
Now the problem is, I cannot pull from myproj.git/hooks/post-receive because the push to the repo is made as the git user so I have permissions problem. I have also tried some deployment scripts but I have been facing a lot of permissions issues.
I have heard of tools like capistrano, fabric, gitolite, but I guess it's too complex for me atm, and I want something easier (very easy to setup, and keep on replicating in multiple projects).
I hope I made myself clear. I think this problem is related - Auto deployment PHP script using Gitolite - but I am not using gitolite and his answer doesn't make sense to me (probably because his English is not too well).
I first started with git and post-recieve hooks myself but didn't really like them. I then switched to a very simple bash script. Even if you don't use the script it's only like 200 lines in total so it's great to steal some snippets from.
The idea behind what I am wanting to do is to create a centralized server on a linux system. I understand how to set this up, and already have. Next I would like to set up git on a windows system, aka the client, which I understand is possible through msysgit, and gitextensions. The problem though is that I am wanting to integrate the windows client to be able to push and pull visual studio files but keep the repositories on the linux server. So in short my question is how to have a centralized server on linux for git, while the client on windows is able to push to this centralized server. Thanks in advance!
I solved my problem. What I wanted to do was to create a ssh connection between the server(linux) and the client (windows). I used tortoise git in this case with the git source control provider (visual studio integration). Just follow the steps within the link and anybody else who might have this problem will be set!
Links:
For tortoise setup: http://theswarmintelligence.blogspot.com/2009/11/windows-tortoisegit-client-for-linux.html
What's the catch here? This sounds like a completely standard use case. It's probably best to use SSH as a transport to push to the server. A couple of things to be aware of are:
You should create your centralized repository as a bare repository (i.e. one without a working tree)
If you have multiple users who will push to that repository, create a group for them on the Linux machine, and make sure that the permissions for the repository are appropriate, e.g.:
git init --bare --shared=group newrepository.git
chgrp -R developers newrepository.git
Or if you're going to have multiple repositories or need more sophisticated access control, you may want to look at using gitolite on the server.
On the client side, GitHub has a nice walkthrough for installing msysgit on Windows (and generating an SSH key) here:
http://help.github.com/win-set-up-git/
... and there are tutorials for gitextensions on its site.