Posts

Showing posts with the label Github

Adding Git Credentials On Windows

Answer : Ideally, you should enter: git config --global credential.helper manager-core Then your password would be stored in the Windows Credential Manager. See more at "Unable to change git account". On the first push, a popup will appear asking for your credentials (username/password) for the target server (for instance github.com ) If not, that might means your credentials were already stored. If they are incorrect, a simple git credential-manager reject https://github.com will remove them (on Windows, again. On Mac: git credential-osxkeychain erase https://github.com ) With Git 2.29 (Q4 2020), the parser in the receiving end of the credential protocol is loosen to allow credential helper to terminate lines with CRLF line ending, as well as LF line ending. See commit 356c473 (03 Oct 2020) by Nikita Leonov ( nyckyta ). (Merged by Junio C Hamano -- gitster -- in commit 542b3c2, 05 Oct 2020) credential : treat CR/LF as line endings in the credential protocol...

Authenticate Jenkins CI For Github Private Repository

Answer : Perhaps GitHub's support for deploy keys is what you're looking for? To quote that page: When should I use a deploy key? Simple, when you have a server that needs pull access to a single private repo. This key is attached directly to the repository instead of to a personal user account. If that's what you're already trying and it doesn't work, you might want to update your question with more details of the URLs being used, the names and location of the key files, etc. Now for the technical part: How to use your SSH key with Jenkins? If you have, say, a jenkins unix user, you can store your deploy key in ~/.ssh/id_rsa . When Jenkins tries to clone the repo via ssh, it will try to use that key. In some setups, you cannot run Jenkins as an own user account, and possibly also cannot use the default ssh key location ~/.ssh/id_rsa . In such cases, you can create a key in a different location, e.g. ~/.ssh/deploy_key , and configure ssh ...

Can't Push Refs To Remote Try Running Pull First To Integrate Your Changes

Answer : You get this try running pull first to integrate your changes whenever your local branch and your remote branch are not on the same point, before your changes. remote branch commits : A -> B -> C -> D local branch commits : A -> B -> C -> Local_Commits Now clearly, there's a change D that you don't have integrated locally. So you need to rebase , then push, which will lead to the following. remote branch commits : A -> B -> C -> D local branch commits : A -> B -> C -> D -> Local_Commits To solve your issue, do the following git pull --rebase origin branchname git push origin branchname I was getting this message in my Azure DevOps Repos environment because the server had a branch policy on the master branch that requires pull request approval and I was trying to push to master directly. Even after pull and rebase the same message appears. I don't think VS Code really knows how to interpret this specific err...

Change GIT Account Of Visual Studio Team Explorer

Image
Answer : Look in the Windows Credential manager and remove/update your credentials there: In my case just removing credentials from Windows Credential didn't fix it. I first removed all git and azure related accounts from Windows Credential, then removed accounts from VS>Files>Account Settings, and then VS asked me new credentials and connected to the project. But my commits were still made with the old account! Finally I found out that it was the git config: C:\Users\[USER NAME]\.gitconfig I deleted the whole user section in that file which looks like this: [user] name = [OLD ACCOUNT NAME] email = [OLD ACCOUNT EMAIL] On next commit VS asked me git account information and done. If you want to work with different accounts for different projects on same machine, read this. I am using VS 2017 and this is how I updated my Password for TFS, using Git repository. From the Menu: Team -> manage Connection Click on Manage Connection Link -> Connect ...

Can't Clone Private Repo On Github From SourceTree

Image
Answer : It happens because SourceTree didn't get some private access from Github while authenticating. So the solution is very simple Login into your Github account on any browser From top right corner select SETTINGS Now select DEVELOPER SETTINGS From DEVELOPER SETTINGS select PERSONAL ACCESS TOKEN Now from PERSONAL ACCESS TOKEN select GENERATE TOKEN Fill Note as sourcetree and Check All Scopes from checkbox as show in below screenshots After Click on Generate Token Now Open sourceTree Click on sourceTree preference & Click add Account Select options as shown in below screen shot Enter username as your Github account username and password as Generated Token from Github Click on SAVE now you might see all your repository are visible and can clone too Hope it helps I had same problem. My fix way: Remove user from SourceTree settings (optional, i not sure); Add you account in setting and generate new SSH key (it's a main part of fix); ...