Authentication failed publishing a repository from Github for Windows - authentication

I am trying out Github for Windows and I am getting the following error when I try to publish a newly created repository.
Authentication failed
Your credentials may be out of date. Please log out of the application and then log back in before retrying the operation.
Needless to say I've logged out and back in multiple times without success. I've also uninstalled and installed the latest version to no avail.
The repository is a new one I created within the application and contains only the .gitattributes, .git and README files.
I am a complete newbie to Github so it's quite possible I've messed something up during the setup process.

I was able to solve this by:
Press Settings - Open in GitShell.
git status
git push (or pull)
introduce credentials (here is the most important step, somehow git client messed up or forgot your credentials).
After giving correct credentials you can exit from git shell and use git client again.

It turns out that the problem was Github for Windows was having a problem with the password it had stored. Github support's instructions were as follows:
Log out of Github for Windows.
Change my password on github.com
Log back into Github for Windows.
I was then able to publish my changes.

Did you setup your ssh keys?
https://help.github.com/articles/generating-ssh-keys#platform-windows

Related

How to push Fossil local repository to remote hosting

It would be great if you could help me with one thing.
I'm using Fossil as my version manager. Using this on my PC is not a problem but when I try to push it to remote repository I can't.
Here's the thing:
When inside folder with my repository I type
fossil push https://chiselapp.com/user/sebatbg/repository/nres
I get info that:
Error: Wrong project
When I type
fossil push https://sebatbg#chiselapp.com/user/sebatbg/repository/nres
It asks for my password but when I enter it fossil says that Login failed
I tried both my pass to chisel app and for specific repository but result is the same.
Could anyone tell me step by step how to do the push?
Thank you
Fossil assigns a unique ID, called the "project ID", to each new repository. The error message "Wrong project" means that you've got different repositories locally and remotely, that their project-IDs don't match.
The only way I know to publish an existing local repository on Chisel is to upload said repository, and then set the remote-url of your local repository to the Chisel URL, either explicitly or by pulling from the URL.
I had a similar problem. I had cloned a remote repository, but could not push to it.
I could solve it by adding the username to the remote url
remote-url https://{username}#chiselapp.com/user/{chiselab-user}/repository/{repository-name}
you are then prompted for the password of the remote repository.
If you have an existing local repository that you would like to upload to the chiselapp hosting service, the process can be a bit awkward. If your repository is smaller than 8M, chiselapp provides a command Upload repository that may suit your purposes. Otherwise, this is what you need to do:
Navigate to a source tree for the local repository.
Issue the fossil info command and copy the project-code of the local
repository. This is a SHA1 hash.
Log in to chiselapp.com website and click on the Create Repository
link in the header of the home page.
Paste the previously copied project-code into the Override Project Code
field of the resulting form.
Fill the remaining fields as appropriate and click the Create Repository
button at the bottom of the page.
Record the password that is then assigned to you.
Navigate to the chiselapp dashboard and click on the name of the newly
created repository. This should bring you to the fossil web interface of this repository.
Login to the new repository using your local username and the recorded
password. This should be the only user so far and should have setup user permissions.
Navigate to the Admin/Stats page and check that the Project ID of the new
remote repository matches the project-code of the local repository.
Back in the local repository's source tree issue the command
fossil push https://<username>:<recorded-password>#chiselapp.com/user/<username>/repository/<repository-name> -R <local-repository-file>

How to switch Intellij Idea project vcs between Gitlab and Amazon CodeCommit?

I am new with Amazon codecommit.
Following their instruction, I did some works like below
make a new IAM user with AdministratorAccess
make a new codecommit repository
install awscli and did aws configure
When I right finished those things, I could pull/push from codecommit.
However it became disabled with intellij Idea.
I did something like...
I pull a project from gitlab
git remote rm origin
git remote add origin [code commit url]
git branch --set-upstream-to origin/master
Now I type git [pull / push] origin master, I got this error message.
unable to access 'https://git-codecommit.ap-northeast-1.amazonaws.com/v1/repos/test17/': The requested URL returned error: 403
When I access this url via browser, it requires id/pw. But my IAM user account information is not working.
What should I do? Is there any way to switch gitlab and codecommit in intellij?
Thanks.
IntelliJ does not use awscli. It uses the default system shell.
From the description, it looks like push/pull does not work for the command-line git in the native shell, so the issue is not IntelliJ-related.
Probably git tries to use wrong credentials save in its credential.helper, that is why it fails.
Check git config credential.helper to see if any is configured. If there is one, try disabling it or clear the saved credentials.
From the description it looks like you are trying to connect to a CodeCommit repository in Intellij using https. To do this you need to generate GitCredentials(username/password) for your iam user in the IAM console.
Detailed steps are documented in the aws documentation: http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html
Once you have the username/password you can use those credentials to connect to your CodeCommit repository in Intellij.
Tested on a Mac. Your milage may vary!
I just ran into the same issue. MacOS stores the GIT UID and PW in the Keychain (in your Applications > Utilities Folder). I deleted all references to AWS Code Commit from the keychain, which forced me to reenter the UID & PW. This seems to have solve the problem.
As a side note: I think this happened because I revoked a prior GIT credential on AWS and created a new one. I think that the keychain was entering the old UID/PW which then failed during authentication.
First, you are going to want to create an IAM user with appropriate permissions and then create Git credentials. Then go to IntelliJ IDEA and say you are opening project from VCS with Git credentials, use the AWS git credentials you created and log in. Once you have logged in, you should be able to pull/push to the repo. If you are still having issues and have checked the credentials you are using are active, along with the IAM user those credentials are attached to have the right permissions, I would recommend creating a ticket on AWS support as there may be something wrong with your account that AWS staff will need to fix.

Jenkins svn export build step

On my Jenkins server, I have a project that checks some source code out of SVN and runs a build script called MakeInstaller.ps1 that got checked out along with the source code. It's pretty straight-forward and this part is working great.
What's not working great is that part of MakeInstaller.ps1 attempts to do an svn export of a specific revision of some other source code, but it doesn't have the credentials to connect to SVN. When I run the build-scripts on my PC this is totally fine, because Tortoise SVN has the credentials cached.
Jenkins has my SVN credentials already, but that's only used when Jenkins checks out the source code, not when my build script attempts to check out the source code.
I've tried:
Installing the Tortoise SVN command-line tools on the machine that's running Jenkins. This fixed my initial "svn.exe not found" error, but it has no way of knowing my credentials for this server
I even logged into the SVN server using Tortoise SVN on that machine to attempt it to get it to cache the credentials, but it's still not working. I'm guessing it's because the Jenkins service does not run under the same user that I was logged in as.
I feel like I'm getting off on the wrong path though. It seems a bit odd to have Tortoise SVN installed on that machine along side whatever SVN client the Jenkins SVN plug-in is already using.
My question: Is there a way to do SVN export from inside a build-script in Jenkins and have it use the credentials that Jenkins already knows about? Can I use the same svn.exe that the Jenkins SVN plug-in is using? I really don't want to include the credentials in the build script itself.
Most of the similar questions I found involved the initial check-out failing due to bad credentials, not a check-out that happens as part of the build script.
In the end, I ended up doing something like Jenkins: Access global passwords in powershell
I had to use EnvInject because the Credentials Binding plugin was giving me an error when I tried to save the project. This involved adding another instance of my SVN password to Jenkins, and hardcoding the Jenkins user name into my build script, but it's working.
Now the build script attempts to authenticate with a dummy svn info command. If I'm running the script on my local machine, that works and it proceeds without a user-name or password. If the dummy svn info command fails, it attempts to log in with --username Jenkins and --password $env:svnpassword where the svnpassword environment variable is provided by EnvInject.

why drone ci doesn't automatically build my repo after pushing commit?

I was trying self hosted drone CI and i have sample repository setup for this project.
I followed all the step to setup and it is able to show and pull the list of all my repo in github, but when i tried to make changes to drone repo nothing happen and it still show empty page with this message.
This will be your commit stream
Add a .drone.yml file and make a commit to trigger a build
I am running drone ci on virtualbox that comes with the Vagrantfile on the drone repo
If you configured everything properly, it may be a formatting problem with your .drone.yml. Drone does not give feedback on these errors and you have to check your webhook logs to discover the problem.
I'm assuming you have properly configured the webhook in your Github repo.
Use your browser to navigate to your Github repo, and select Settings tab.
Under settings, select Webhooks. You should find the webhook you configured to your self hosted Drone
Click on the specific webhook and at the bottom you can find the Recent deliveries section. This is a log of all events your repo has tried to communicate to Drone.
Check the response the Drone server sent you.

how can I acces a Github repo from a 2nd machine?

Although there is a number of questions on the topic, I'm not getting anywhere....
I need to access an existing repo on Github from an alternate machine and I'm having trouble setting it up.
So I have installed Github and ran:
git config global --user.name
git config global --user.email
git init
git clone git#github.com:user/repo.git
I'm getting Permisson Denied (publickey)
Which I guess is due to me not having provided my SSH key. I have the key here, but no clue, what to do.
Question:
How to do I supply the SSH key to be able to connect my 2nd PC to my git repo.
Thanks!
You need to register another ssh key with github for the second computer.
Go here and add another key. This page explains the process.
You can switch to https authentication if you don't want to generate another pair of key or transfer your existing one to the new box.
You will need to change your clone command to following: git clone https://github.com/user/repo.git
Their help section has a nice step-by-step guide to setting up your machin: https://help.github.com/articles/generating-ssh-keys#platform-all.
Specifically, see step 4 for instructions on how to import a new key.